3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { function RunEvent($event) { if (isset($this->events[$event])) { foreach ($this->events[$event] as $k => $v) { //call_user_func($v, &$this); // The above line is working code on PHP 5.3.3, but // throws a parse error on PHP 5.5.3. call_user_func($v, &$this); } } } } $e = new Example; $e->events['example'][] = 'with_ref'; $e->events['example'][] = 'without_ref'; $e->RunEvent('example'); function with_ref(&$e) { $e->with_ref = true; } function without_ref($e) { $e->without_ref = true; } print_r($e);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.230.0110.04512.38
5.4.220.0130.04112.38
5.4.210.0120.04112.38
5.4.200.0140.06012.38
5.4.190.0160.04512.38
5.4.180.0130.04412.38
5.4.170.0130.04212.39
5.4.160.0160.04312.39
5.4.150.0190.04312.38
5.4.140.0140.04312.07
5.4.130.0120.04012.05
5.4.120.0130.03912.01
5.4.110.0130.04512.01
5.4.100.0150.04212.01
5.4.90.0150.05612.01
5.4.80.0160.04212.01
5.4.70.0140.04012.01
5.4.60.0150.05712.01
5.4.50.0140.03812.01
5.4.40.0090.04612.00
5.4.30.0110.04211.99
5.4.20.0120.04211.99
5.4.10.0100.04211.99
5.4.00.0130.03811.48
5.3.290.0080.04312.80
5.3.280.0140.04112.71
5.3.270.0110.04712.72
5.3.260.0090.04712.72
5.3.250.0150.03912.72
5.3.240.0150.03912.72
5.3.230.0100.04612.71
5.3.220.0130.04112.68
5.3.210.0100.04612.68
5.3.200.0130.04012.68
5.3.190.0180.03812.68
5.3.180.0220.03412.67
5.3.170.0130.04212.67
5.3.160.0090.04612.67
5.3.150.0150.04112.67
5.3.140.0150.03912.66
5.3.130.0130.04512.66
5.3.120.0130.04212.66
5.3.110.0130.04812.66
5.3.100.0190.05012.12
5.3.90.0130.04012.10
5.3.80.0100.04212.09
5.3.70.0120.03912.09
5.3.60.0150.04712.07
5.3.50.0120.04312.02
5.3.40.0170.06212.03
5.3.30.0140.04311.99
5.3.20.0120.04311.76
5.3.10.0200.04711.73
5.3.00.0120.04911.72

preferences:
141.2 ms | 1394 KiB | 7 Q