3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $directory = new Directory('.'); $start_time = explode(" ", microtime()); $start_time = $start_time[1] + $start_time[0]; for ($i=1;$i<10000000;$i++) method_exists($directory,'read'); $end_time = explode(" ", microtime()); $end_time = $end_time[1] + $end_time[0]; echo '<br>method_exists time:' . ($end_time - $start_time); $start_time = explode(" ", microtime()); $start_time = $start_time[1] + $start_time[0]; $params = array($directory,'read'); for ($i=1;$i<10000000;$i++) is_callable($params); $end_time = explode(" ", microtime()); $end_time = $end_time[1] + $end_time[0]; echo '<br>is_callable time:' . ($end_time - $start_time); die; class A { static function b() { return 'soy b static'; } function a() { return 'soy a'; } } //$z=new a; //var_dump(is_callable($z::b())); $b=[new a, 'b']; var_dump(is_callable($b, false, $ret)); var_dump($ret); var_dump(get_defined_vars());
Output for 7.1.0
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.28716516494751<br>is_callable time:0.73364090919495
Output for 7.0.14
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.33632397651672<br>is_callable time:0.87333607673645
Output for 7.0.10
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.30450391769409<br>is_callable time:0.64456295967102
Output for 7.0.9
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.2800018787384<br>is_callable time:0.60707306861877
Output for 7.0.8
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.3250880241394<br>is_callable time:0.65546488761902
Output for 7.0.7
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.33304190635681<br>is_callable time:0.66743993759155
Output for 7.0.6
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.34069490432739<br>is_callable time:0.67675089836121
Output for 7.0.5
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.32193088531494<br>is_callable time:0.64202690124512
Output for 7.0.4
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.33241701126099<br>is_callable time:0.73937201499939
Output for 7.0.3
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.33861804008484<br>is_callable time:0.67392516136169
Output for 7.0.2
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.36283302307129<br>is_callable time:0.70339894294739
Output for 7.0.1
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.34920501708984<br>is_callable time:0.71372079849243
Output for 7.0.0
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; A has a deprecated constructor in /in/Wu9L8 on line 32 <br>method_exists time:0.32937812805176<br>is_callable time:0.68162798881531
Output for hhvm-3.12.0
Warning: Permission denied <br>method_exists time:1.5718100070953
Process exited with code 137.
Output for hhvm-3.10.0
Warning: Permission denied <br>method_exists time:1.5864338874817
Process exited with code 137.
Output for 5.6.28
<br>method_exists time:2.1218481063843
Process exited with code 137.
Output for 5.6.25
<br>method_exists time:1.176558971405<br>is_callable time:1.1536719799042
Output for 5.6.24
<br>method_exists time:1.2546310424805
Process exited with code 137.
Output for 5.6.23
<br>method_exists time:1.3026239871979
Process exited with code 137.
Output for 5.6.22
<br>method_exists time:1.3431718349457
Process exited with code 137.
Output for 5.6.21
<br>method_exists time:1.3153178691864
Process exited with code 137.
Output for 5.6.20
<br>method_exists time:1.3332760334015
Process exited with code 137.
Output for 5.6.19
<br>method_exists time:1.2367630004883<br>is_callable time:1.1400270462036
Output for 5.6.18
<br>method_exists time:1.3174300193787
Process exited with code 137.
Output for 5.6.17
<br>method_exists time:1.2186150550842<br>is_callable time:1.1269340515137
Output for 5.6.16
<br>method_exists time:1.2767260074615<br>is_callable time:1.1138880252838
Output for 5.6.15
<br>method_exists time:1.1561670303345<br>is_callable time:1.1125240325928
Output for 5.6.14
<br>method_exists time:1.2636818885803
Process exited with code 137.
Output for 5.6.13
<br>method_exists time:1.3955750465393
Process exited with code 137.
Output for 5.6.12
<br>method_exists time:1.3592319488525
Process exited with code 137.
Output for 5.6.11
<br>method_exists time:1.2885210514069
Process exited with code 137.
Output for 5.6.10
<br>method_exists time:1.2831561565399<br>is_callable time:1.1152789592743
Output for 5.6.9
<br>method_exists time:1.2824580669403<br>is_callable time:1.1080892086029
Output for 5.6.8
<br>method_exists time:1.2304918766022<br>is_callable time:1.1087567806244
Output for 5.6.7
<br>method_exists time:1.3703699111938
Process exited with code 137.
Output for 5.6.6
<br>method_exists time:1.3176860809326
Process exited with code 137.
Output for 5.6.5
<br>method_exists time:1.2345640659332<br>is_callable time:1.1422100067139
Output for 5.6.4
<br>method_exists time:1.3808541297913
Process exited with code 137.
Output for 5.6.3
<br>method_exists time:1.3051178455353
Process exited with code 137.
Output for 5.6.2
<br>method_exists time:1.3614392280579
Process exited with code 137.
Output for 5.6.1
<br>method_exists time:1.247123003006<br>is_callable time:1.1239039897919
Output for 5.6.0
<br>method_exists time:1.295695066452<br>is_callable time:1.1211349964142
Output for 5.5.38
<br>method_exists time:1.4250259399414
Process exited with code 137.
Output for 5.5.37
<br>method_exists time:1.2135539054871<br>is_callable time:1.1432671546936
Output for 5.5.36
<br>method_exists time:1.5942800045013
Process exited with code 137.
Output for 5.4.10 - 5.4.13, 5.4.17 - 5.4.18, 5.4.28 - 5.4.29, 5.4.36, 5.4.42, 5.4.44 - 5.4.45, 5.5.5 - 5.5.6, 5.5.13, 5.5.16 - 5.5.18, 5.5.20, 5.5.22, 5.5.27, 5.5.33, 5.5.35

Process exited with code 137.
Output for 5.5.34
<br>method_exists time:1.2387759685516<br>is_callable time:1.1504080295563
Output for 5.5.32
<br>method_exists time:1.3266618251801
Process exited with code 137.
Output for 5.5.31
<br>method_exists time:1.2059910297394<br>is_callable time:1.155867099762
Output for 5.5.30
<br>method_exists time:1.2272469997406<br>is_callable time:1.1444890499115
Output for 5.5.29
<br>method_exists time:1.3401861190796
Process exited with code 137.
Output for 5.5.28
<br>method_exists time:1.2857110500336<br>is_callable time:1.123085975647
Output for 5.5.26
<br>method_exists time:1.4935519695282
Process exited with code 137.
Output for 5.5.25
<br>method_exists time:2.3250849246979
Process exited with code 137.
Output for 5.5.24
<br>method_exists time:1.5239698886871
Process exited with code 137.
Output for 5.5.23
<br>method_exists time:1.3084099292755
Process exited with code 137.
Output for 5.5.21
<br>method_exists time:1.3943920135498
Process exited with code 137.
Output for 5.5.19
<br>method_exists time:1.2925360202789<br>is_callable time:1.114926815033
Output for 5.5.15
<br>method_exists time:1.1869270801544<br>is_callable time:1.1223361492157
Output for 5.5.14
<br>method_exists time:1.4403290748596
Process exited with code 137.
Output for 5.5.12
<br>method_exists time:1.2719550132751<br>is_callable time:1.095370054245
Output for 5.5.11
<br>method_exists time:1.3728721141815
Process exited with code 137.
Output for 5.5.10
<br>method_exists time:1.3587172031403
Process exited with code 137.
Output for 5.5.9
<br>method_exists time:2.2991709709167
Process exited with code 137.
Output for 5.5.8
<br>method_exists time:1.199777841568<br>is_callable time:1.1111199855804
Output for 5.5.7
<br>method_exists time:1.4456729888916
Process exited with code 137.
Output for 5.5.4
<br>method_exists time:1.4239299297333
Process exited with code 137.
Output for 5.5.3
<br>method_exists time:1.5041589736938
Process exited with code 137.
Output for 5.5.2
<br>method_exists time:1.4818749427795
Process exited with code 137.
Output for 5.5.1
<br>method_exists time:1.1972029209137<br>is_callable time:1.1181299686432
Output for 5.5.0
<br>method_exists time:1.3117091655731
Process exited with code 137.
Output for 5.4.43
<br>method_exists time:1.1736838817596<br>is_callable time:1.1528248786926
Output for 5.4.41
<br>method_exists time:1.188264131546<br>is_callable time:1.1466379165649
Output for 5.4.40
<br>method_exists time:1.2635288238525
Process exited with code 137.
Output for 5.4.39
<br>method_exists time:1.2281460762024<br>is_callable time:1.1213140487671
Output for 5.4.38
<br>method_exists time:1.3760099411011
Process exited with code 137.
Output for 5.4.37
<br>method_exists time:1.3024771213531
Process exited with code 137.
Output for 5.4.35
<br>method_exists time:2.2339959144592
Process exited with code 137.
Output for 5.4.34
<br>method_exists time:1.3413050174713
Process exited with code 137.
Output for 5.4.32
<br>method_exists time:1.1913740634918<br>is_callable time:1.1233718395233
Output for 5.4.31
<br>method_exists time:1.1361711025238<br>is_callable time:1.1272089481354
Output for 5.4.30
<br>method_exists time:2.2928340435028
Process exited with code 137.
Output for 5.4.27
<br>method_exists time:1.2583298683167<br>is_callable time:1.1223299503326
Output for 5.4.26
<br>method_exists time:1.3705070018768
Process exited with code 137.
Output for 5.4.25
<br>method_exists time:1.2793781757355
Process exited with code 137.
Output for 5.4.24
<br>method_exists time:1.3432259559631
Process exited with code 137.
Output for 5.4.23
<br>method_exists time:1.2818920612335<br>is_callable time:1.1333999633789
Output for 5.4.22
<br>method_exists time:1.4282519817352
Process exited with code 137.
Output for 5.4.21
<br>method_exists time:1.3234288692474
Process exited with code 137.
Output for 5.4.20
<br>method_exists time:1.3127660751343
Process exited with code 137.
Output for 5.4.19
<br>method_exists time:1.1479949951172<br>is_callable time:1.1203210353851
Output for 5.4.16
<br>method_exists time:1.297956943512<br>is_callable time:1.1248579025269
Output for 5.4.15
<br>method_exists time:1.1052329540253<br>is_callable time:1.1378381252289
Output for 5.4.14
<br>method_exists time:1.1879599094391<br>is_callable time:1.1264729499817
Output for 5.4.9
<br>method_exists time:1.3089249134064
Process exited with code 137.
Output for 5.4.8
<br>method_exists time:1.2992870807648<br>is_callable time:1.1173419952393
Output for 5.4.7
<br>method_exists time:1.3497049808502
Process exited with code 137.
Output for 5.4.6
<br>method_exists time:1.4360220432281
Process exited with code 137.
Output for 5.4.5
<br>method_exists time:1.2783880233765<br>is_callable time:1.1394071578979
Output for 5.4.4
<br>method_exists time:1.2875559329987<br>is_callable time:1.1341609954834
Output for 5.4.3
<br>method_exists time:1.2281830310822<br>is_callable time:1.1390118598938
Output for 5.4.2
<br>method_exists time:1.154317855835<br>is_callable time:1.1297571659088
Output for 5.4.1
<br>method_exists time:1.206020116806<br>is_callable time:1.1384029388428
Output for 5.4.0
<br>method_exists time:1.160248041153<br>is_callable time:1.1412169933319
Output for 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Wu9L8 on line 50
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/Wu9L8 on line 50
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/Wu9L8 on line 34
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/Wu9L8 on line 34
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/Wu9L8 on line 34
Process exited with code 255.