3v4l.org

run code in 300+ PHP versions simultaneously
<?php function e($n,$p,$c=0){static $a;@krsort($a[$n]);if($c)$a[$n][$p][]=$c;else foreach($a[$n] as$q)foreach($q as$r)$r($p);} function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1); class Foo { private $eventDispatcher; function __construct($eventDispatcher) { die(var_dump($eventDispatcher)); $this->eventDispatcher = $eventDispatcher; } function doStuff() { // ... call_user_func($this->eventDispatcher, "my_event", "my data"); } } $foo = new Foo(@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.320.0050.03712.53
5.4.310.0100.04012.53
5.4.300.0090.04012.53
5.4.290.0090.04112.53
5.4.280.0070.03512.43
5.4.270.0080.05112.42
5.4.260.0040.03912.42
5.4.250.0070.04312.42
5.4.240.0060.03512.42
5.4.230.0070.04612.42
5.4.220.0110.03412.41
5.4.210.0050.04212.42
5.4.200.0080.03512.42
5.4.190.0080.03512.41
5.4.180.0070.03712.41
5.4.170.0090.04212.42
5.4.160.0090.04312.41
5.4.150.0040.03812.41
5.4.140.0080.03512.10
5.4.130.0050.03612.09
5.4.120.0050.03612.05
5.4.110.0070.04012.04
5.4.100.0060.03512.04
5.4.90.0100.03812.04
5.4.80.0040.03912.05
5.4.70.0060.03612.04
5.4.60.0150.04112.04
5.4.50.0110.03712.04
5.4.40.0050.03612.02
5.4.30.0050.03712.02
5.4.20.0120.04312.02
5.4.10.0050.03712.02
5.4.00.0050.03611.51
5.3.290.0050.04312.80
5.3.280.0080.03512.71
5.3.270.0060.04012.73
5.3.260.0070.03812.72
5.3.250.0050.03912.72
5.3.240.0060.03812.72
5.3.230.0070.04312.70
5.3.220.0070.03512.68
5.3.210.0060.04112.68
5.3.200.0070.03712.68
5.3.190.0110.03412.68
5.3.180.0090.03412.67
5.3.170.0060.03712.67
5.3.160.0070.03612.68
5.3.150.0040.03812.67
5.3.140.0030.03912.66
5.3.130.0080.03712.66
5.3.120.0140.03912.66
5.3.110.0060.03912.66
5.3.100.0050.03812.15
5.3.90.0040.03912.13
5.3.80.0060.03812.11
5.3.70.0040.03912.11
5.3.60.0070.03912.10
5.3.50.0100.03712.04
5.3.40.0040.03812.04
5.3.30.0080.03212.00
5.3.20.0070.04111.79
5.3.10.0060.04411.75
5.3.00.0080.04111.74
5.2.170.0060.0339.24
5.2.160.0050.0369.24
5.2.150.0040.0349.24
5.2.140.0060.0309.24
5.2.130.0070.0329.20
5.2.120.0050.0309.20
5.2.110.0030.0349.21
5.2.100.0050.0289.20
5.2.90.0030.0319.20
5.2.80.0020.0329.20
5.2.70.0060.0309.20
5.2.60.0040.0329.15
5.2.50.0060.0319.13
5.2.40.0080.0289.09
5.2.30.0050.0339.07
5.2.20.0090.0339.06
5.2.10.0060.0288.96
5.2.00.0080.0378.83
5.1.60.0100.0278.12
5.1.50.0040.0318.11
5.1.40.0030.0328.10
5.1.30.0070.0288.44
5.1.20.0060.0258.47
5.1.10.0040.0268.18
5.1.00.0040.0328.18
5.0.50.0060.0226.67
5.0.40.0070.0256.53
5.0.30.0040.0336.34
5.0.20.0060.0206.30
5.0.10.0070.0226.29
5.0.00.0030.0336.29
4.4.90.0040.0204.78
4.4.80.0070.0164.75
4.4.70.0050.0234.75
4.4.60.0020.0214.75
4.4.50.0040.0184.77
4.4.40.0040.0274.71
4.4.30.0040.0184.76
4.4.20.0030.0184.85
4.4.10.0030.0184.85
4.4.00.0090.0254.76
4.3.110.0040.0204.67
4.3.100.0040.0244.67
4.3.90.0040.0194.64
4.3.80.0060.0254.58
4.3.70.0020.0154.63
4.3.60.0020.0164.63
4.3.50.0030.0154.63
4.3.40.0060.0214.54
4.3.30.0020.0183.32
4.3.20.0040.0143.30
4.3.10.0000.0173.26
4.3.00.0000.0236.86

preferences:
148.01 ms | 1394 KiB | 7 Q