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)
8.3.60.0100.00718.55
8.3.50.0050.01221.13
8.3.40.0070.01418.92
8.3.30.0110.00420.27
8.3.20.0080.01120.16
8.3.10.0040.00420.96
8.3.00.0080.00022.44
8.2.180.0140.00716.88
8.2.170.0140.00722.96
8.2.160.0170.00322.17
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0050.00320.87
8.2.110.0060.00319.45
8.2.100.0070.00417.84
8.2.90.0000.00819.22
8.2.80.0030.00618.04
8.2.70.0080.00017.60
8.2.60.0110.00018.04
8.2.50.0040.00418.07
8.2.40.0030.00518.28
8.2.30.0030.00319.42
8.2.20.0080.00017.84
8.2.10.0040.00417.68
8.2.00.0030.00617.75
8.1.280.0070.01325.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00022.59
8.1.230.0070.00421.04
8.1.220.0060.00318.77
8.1.210.0090.00319.09
8.1.200.0060.00317.35
8.1.190.0090.00017.38
8.1.180.0000.00818.10
8.1.170.0050.00318.53
8.1.160.0020.00518.95
8.1.150.0040.00418.71
8.1.140.0040.00417.46
8.1.130.0000.00717.71
8.1.120.0050.00217.41
8.1.110.0040.00417.49
8.1.100.0030.00317.43
8.1.90.0000.00717.48
8.1.80.0000.00717.39
8.1.70.0000.00717.43
8.1.60.0100.00317.62
8.1.50.0030.00617.43
8.1.40.0040.00417.45
8.1.30.0040.00417.55
8.1.20.0000.00817.59
8.1.10.0000.00817.45
8.1.00.0020.00517.49
8.0.300.0040.00419.97
8.0.290.0000.00717.05
8.0.280.0000.00718.36
8.0.270.0040.00417.27
8.0.260.0030.00316.89
8.0.250.0040.00416.95
8.0.240.0000.00816.98
8.0.230.0030.00616.88
8.0.220.0050.00316.86
8.0.210.0040.00416.89
8.0.200.0000.00816.88
8.0.190.0000.00816.95
8.0.180.0000.00716.90
8.0.170.0040.00416.82
8.0.160.0000.00716.91
8.0.150.0020.00516.79
8.0.140.0120.00016.87
8.0.130.0000.00613.38
8.0.120.0040.00416.82
8.0.110.0040.00416.97
8.0.100.0000.00716.79
8.0.90.0000.00716.91
8.0.80.0080.00716.84
8.0.70.0000.00716.80
8.0.60.0040.00416.78
8.0.50.0040.00416.93
8.0.30.0100.00817.15
8.0.20.0080.01117.40
8.0.10.0040.00416.99
8.0.00.0100.00716.62
7.4.330.0000.00516.84
7.4.320.0060.00016.57
7.4.300.0060.00016.61
7.4.290.0040.00416.52
7.4.280.0030.00316.52
7.4.270.0030.00316.60
7.4.260.0000.00613.29
7.4.250.0000.00816.46
7.4.240.0020.00516.53
7.4.230.0000.00716.61
7.4.220.0060.01616.51
7.4.210.0040.01016.55
7.4.200.0000.00716.64
7.4.190.0030.00316.56
7.4.160.0040.01516.39
7.4.150.0090.00917.40
7.4.140.0110.01017.86
7.4.130.0050.01116.55
7.4.120.0140.00816.47
7.4.110.0030.01316.56
7.4.100.0150.00816.54
7.4.90.0070.01016.63
7.4.80.0070.01019.39
7.4.70.0060.00916.50
7.4.60.0060.00916.51
7.4.50.0040.00416.64
7.4.40.0120.00322.77
7.4.30.0040.01216.66
7.4.00.0100.00815.03
7.3.330.0020.00213.36
7.3.320.0030.00313.18
7.3.310.0040.00416.25
7.3.300.0030.00316.23
7.3.290.0070.00716.35
7.3.280.0060.01116.37
7.3.270.0150.00317.40
7.3.260.0110.00718.24
7.3.250.0100.00716.37
7.3.240.0030.01516.43
7.3.230.0110.00716.56
7.3.210.0130.00716.28
7.3.200.0140.00319.39
7.3.190.0130.01016.33
7.3.180.0140.00416.36
7.3.170.0090.00616.28
7.3.160.0130.00316.65
7.3.120.0090.00814.80
7.3.110.0100.00714.84
7.3.100.0070.00714.92
7.3.90.0120.00314.83
7.3.80.0040.01215.04
7.3.70.0040.01114.58
7.3.60.0060.00314.65
7.3.50.0060.00614.76
7.3.40.0070.00714.79
7.3.30.0100.00714.92
7.3.20.0030.00816.41
7.3.10.0040.00416.84
7.3.00.0030.01216.68
7.2.330.0070.01116.55
7.2.320.0150.00316.75
7.2.310.0130.01016.50
7.2.300.0090.00816.83
7.2.290.0030.01316.66
7.2.250.0040.01115.32
7.2.240.0060.01015.13
7.2.230.0060.00915.34
7.2.220.0030.01014.89
7.2.210.0040.01215.27
7.2.200.0040.01115.02
7.2.190.0060.00615.01
7.2.180.0030.00715.17
7.2.170.0090.00914.86
7.2.60.0070.00716.89
7.1.330.0100.00615.53
7.1.320.0060.00915.69
7.1.310.0100.00315.95
7.1.300.0050.00515.44
7.1.290.0030.01015.84
7.1.280.0030.00715.73
7.1.270.0090.00315.75
7.1.260.0060.00915.53
7.1.200.0070.00415.72
7.1.70.0000.00717.06
7.1.60.0170.00319.17
7.1.50.0100.01016.65
7.1.00.0030.05322.45
7.0.200.0170.00314.86
7.0.140.0030.07021.92
7.0.100.0330.07319.93
7.0.90.0200.07019.97
7.0.80.0000.04719.98
7.0.70.0230.07020.00
7.0.60.0200.08719.97
7.0.50.0130.09020.38
7.0.40.0070.06019.99
7.0.30.0130.07720.04
7.0.20.0170.06020.14
7.0.10.0100.08020.14
7.0.00.0070.08320.13
5.6.280.0100.06721.10
5.6.250.0000.05020.63
5.6.240.0030.08020.70
5.6.230.0170.04320.66
5.6.220.0100.06320.52
5.6.210.0070.06320.75
5.6.200.0130.06721.18
5.6.190.0070.04721.01
5.6.180.0030.08321.03
5.6.170.0070.04321.01
5.6.160.0070.08021.11
5.6.150.0000.09021.01
5.6.140.0070.08021.01
5.6.130.0070.07721.11
5.6.120.0100.04020.96
5.6.110.0000.04721.08
5.6.100.0070.06721.16
5.6.90.0030.07321.04
5.6.80.0130.07320.56
5.6.70.0030.08020.46
5.6.60.0000.05020.31
5.6.50.0030.07020.43
5.6.40.0130.05020.46
5.6.30.0130.08020.37
5.6.20.0070.04320.38
5.6.10.0100.07720.33
5.6.00.0130.06320.34
5.5.380.0100.08320.34
5.5.370.0070.06720.57
5.5.360.0130.07320.45
5.5.350.0070.08020.43
5.5.340.0070.04720.93
5.5.330.0100.04720.93
5.5.320.0070.08320.79
5.5.310.0200.03720.73
5.5.300.0170.04020.83
5.5.290.0200.09020.88
5.5.280.0100.06020.84
5.5.270.0070.04320.86
5.5.260.0100.08020.91
5.5.250.0030.08320.58
5.5.240.0030.08020.12
5.5.230.0100.06720.10
5.5.220.0200.06720.14
5.5.210.0030.05320.12
5.5.200.0170.06320.16
5.5.190.0170.07020.26
5.5.180.0030.08720.23
5.5.160.0200.06720.27
5.5.150.0100.03020.16
5.5.140.0030.04320.11
5.5.130.0130.03320.23
5.5.120.0130.04020.13
5.5.110.0100.03320.24
5.5.100.0000.08320.10
5.5.90.0170.05320.07
5.5.80.0070.04320.09
5.5.70.0100.07720.07
5.5.60.0130.07320.10
5.5.50.0070.04319.97
5.5.40.0270.03020.06
5.5.30.0130.06320.14
5.5.20.0070.04320.04
5.5.10.0100.03720.08
5.5.00.0030.04020.09
5.4.450.0070.07719.36
5.4.440.0070.04719.49
5.4.430.0100.07719.45
5.4.420.0000.09019.20
5.4.410.0100.07319.05
5.4.400.0070.07719.07
5.4.390.0170.05319.03
5.4.380.0100.07318.85
5.4.370.0070.06318.95
5.4.360.0130.05718.85
5.4.350.0170.07319.23
5.4.340.0100.07019.13
5.4.320.0070.07719.23
5.4.310.0130.05718.96
5.4.300.0100.07319.12
5.4.290.0100.04018.95
5.4.280.0070.05719.09
5.4.270.0170.05718.96
5.4.260.0030.04019.04
5.4.250.0070.07719.04
5.4.240.0030.07719.20
5.4.230.0100.04019.13
5.4.220.0100.06319.15
5.4.210.0100.06018.92
5.4.200.0070.04018.87
5.4.190.0170.03318.89
5.4.180.0070.03719.15
5.4.170.0030.04319.03
5.4.160.0100.03019.14
5.4.150.0100.04018.88
5.4.140.0030.03716.44
5.4.130.0070.03316.45
5.4.120.0000.03716.34
5.4.110.0000.04016.56
5.4.100.0000.03316.44
5.4.90.0070.03716.52
5.4.80.0030.03016.39
5.4.70.0030.03016.38
5.4.60.0070.02716.37
5.4.50.0000.03316.30
5.4.40.0000.04016.49
5.4.30.0030.03316.30
5.4.20.0070.03016.35
5.4.10.0000.03316.32
5.4.00.0000.03715.83
5.3.290.0070.04314.62
5.3.280.0070.07714.71
5.3.270.0100.03714.64
5.3.260.0100.03314.54
5.3.250.0000.04014.75
5.3.240.0000.04014.63
5.3.230.0070.03714.72
5.3.220.0030.03714.59
5.3.210.0000.04314.50
5.3.200.0000.04014.55
5.3.190.0000.03314.52
5.3.180.0030.03014.66
5.3.170.0030.03714.55
5.3.160.0070.03014.69
5.3.150.0000.03314.55
5.3.140.0000.04014.57
5.3.130.0030.03014.62
5.3.120.0070.03714.48
5.3.110.0030.03314.67
5.3.100.0030.03014.13
5.3.90.0000.03313.96
5.3.80.0100.02713.93
5.3.70.0000.03314.04
5.3.60.0000.03313.99
5.3.50.0030.03713.98
5.3.40.0000.03314.00
5.3.30.0030.03314.00
5.3.20.0000.03013.69
5.3.10.0070.02713.68
5.3.00.0100.03013.58
5.2.170.0030.03012.25
5.2.160.0070.02012.25
5.2.150.0030.03012.25
5.2.140.0100.02012.25
5.2.130.0000.03012.25
5.2.120.0000.02712.25
5.2.110.0070.02012.25
5.2.100.0030.02712.25
5.2.90.0030.02312.25
5.2.80.0000.03012.25
5.2.70.0000.03712.25
5.2.60.0070.02012.25
5.2.50.0070.02312.25
5.2.40.0030.02312.25
5.2.30.0030.02312.25
5.2.20.0000.03012.25
5.2.10.0070.02012.25
5.2.00.0000.02712.25
5.1.60.0030.02012.25
5.1.50.0000.02712.25
5.1.40.0070.02012.25
5.1.30.0070.02012.25
5.1.20.0030.02012.25
5.1.10.0000.02712.25
5.1.00.0030.03012.25
5.0.50.0030.02012.25
5.0.40.0100.04012.25
5.0.30.0030.03012.25
5.0.20.0000.02012.25
5.0.10.0100.02712.25
5.0.00.0070.06312.25
4.4.90.0030.01012.25
4.4.80.0030.01312.25
4.4.70.0000.01712.25
4.4.60.0000.01712.25
4.4.50.0000.01712.25
4.4.40.0030.02012.25
4.4.30.0030.01312.25
4.4.20.0000.01312.25
4.4.10.0070.01312.25
4.4.00.0000.02312.25
4.3.110.0000.01712.25
4.3.100.0000.01712.25
4.3.90.0000.03712.25
4.3.80.0000.05712.25
4.3.70.0000.02712.25
4.3.60.0000.02312.25
4.3.50.0070.03012.25
4.3.40.0070.03312.25
4.3.30.0030.02012.25
4.3.20.0000.01312.25
4.3.10.0030.03312.25
4.3.00.0030.03312.25

preferences:
28.62 ms | 401 KiB | 5 Q