|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||||
|
||||||
|
Functions outside own classes
In the restrictions there is a line with this rule:
Quote:
What is, if I want to use some array functions like array_filter() or array_walk() which need a function pointer as parameter ? for example: php Code:
Is this allowed ? I didn't find any way to use a member function of a class in the array_filter(). |
|
#2
|
|||
|
|||
|
RE: Functions outside own classes
this should work:
array_filter(array(1,2,3), array(myObj, 'methodName')); |
|
#4
|
|||
|
|||
|
RE: Functions outside own classes
umh, didn't think of that..
it will be ok for this contest, but i will have to think about it for the next one.. (prefixing probably) |
|
#5
|
|||
|
|||
|
RE: Functions outside own classes
I think, u MUST add this to contest rules now, becoz u know what will happen if someone defines my constant before me. There will be warning, and after all, my script will suck
|
|
#6
|
|||
|
|||
|
RE: Functions outside own classes
i think i CANT add any rules just two days before the closing day of the contest, don't you agree?
btw, for this contest, your scripts will be loaded only one-at-a-time, so there is no way for that to happen. in the next contest, there will be a rule about that.. |
|
#7
|
|||
|
|||
|
RE: Functions outside own classes
If only one at the time - there is no problem.
|
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Current Contest > Functions outside own classes |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|