3v4l.org

run code in 300+ PHP versions simultaneously
<?php function by_ref(&$arg) { $arg = 42; } class ModuleHandler { public function invokeAll($hook, $args) { by_ref($args[0]); } } $moduleHandler = new ModuleHandler(); $moduleHandler->invokeAll('example', array(23)); $x = 25; $array = array(0 => &$x); $moduleHandler->invokeAll('example', $array); var_dump($array);

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.5.10.0120.00520.06
8.5.00.0140.00820.02
8.4.150.0010.00114.05
8.4.140.0120.01017.53
8.4.130.0080.00519.71
8.4.120.0120.00720.77
8.4.110.0140.00822.40
8.4.100.0040.00517.93
8.4.90.0110.01118.52
8.4.80.0110.00920.54
8.4.70.0110.00918.14
8.4.60.0120.01019.07
8.4.50.0110.01020.52
8.4.40.0100.01017.60
8.4.30.0050.00317.76
8.4.20.0040.00717.73
8.4.10.0000.00917.63
8.3.280.0130.00618.39
8.3.270.0120.00816.63
8.3.260.0130.00816.50
8.3.250.0140.00618.90
8.3.240.0110.00816.41
8.3.230.0060.00316.31
8.3.220.0060.00218.98
8.3.210.0090.00616.70
8.3.200.0040.00716.64
8.3.190.0050.00317.04
8.3.180.0080.00416.34
8.3.170.0090.00918.77
8.3.160.0150.00317.32
8.3.150.0080.01218.79
8.3.140.0070.00716.69
8.3.130.0130.00716.46
8.3.120.0060.00318.85
8.3.110.0000.00920.94
8.3.100.0000.00918.46
8.3.90.0110.00318.45
8.3.80.0100.00018.18
8.3.70.0170.00716.63
8.3.60.0100.01016.35
8.3.50.0090.01021.27
8.3.40.0040.01118.56
8.3.30.0080.00618.84
8.3.20.0080.00020.24
8.3.10.0000.00821.94
8.3.00.0000.00823.74
8.2.290.0110.00920.44
8.2.280.0090.00718.37
8.2.270.0040.00417.41
8.2.260.0140.00418.15
8.2.250.0040.00418.41
8.2.240.0090.00016.79
8.2.230.0060.00322.58
8.2.220.0070.00324.06
8.2.210.0090.00926.77
8.2.200.0090.00016.58
8.2.190.0120.00318.43
8.2.180.0070.00716.49
8.2.170.0040.01122.96
8.2.160.0070.00720.52
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0070.00019.77
8.2.120.0080.00026.35
8.2.110.0030.00620.93
8.2.100.0040.00717.72
8.2.90.0040.00417.75
8.2.80.0060.00318.59
8.2.70.0060.00317.60
8.2.60.0060.00317.63
8.2.50.0040.00418.05
8.2.40.0050.00319.48
8.2.30.0040.00420.63
8.2.20.0000.00717.60
8.2.10.0080.00018.16
8.2.00.0070.00018.13
8.1.330.0120.00823.55
8.1.320.0100.00916.08
8.1.310.0140.00416.70
8.1.300.0030.00718.25
8.1.290.0070.00418.88
8.1.280.0060.01325.92
8.1.270.0030.00723.97
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0050.00521.25
8.1.230.0060.00519.12
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0050.00317.62
8.1.160.0050.00218.72
8.1.150.0000.00718.84
8.1.140.0040.00419.57
8.1.130.0030.00317.62
8.1.120.0070.00017.44
8.1.110.0000.00717.39
8.1.100.0070.00017.41
8.1.90.0040.00417.43
8.1.80.0070.00017.31
8.1.70.0000.00717.32
8.1.60.0030.00517.45
8.1.50.0040.00417.46
8.1.40.0080.00017.48
8.1.30.0080.00017.73
8.1.20.0030.00517.68
8.1.10.0080.00017.57
8.1.00.0040.00417.47
8.0.300.0000.00718.77
8.0.290.0040.00416.63
8.0.280.0000.00718.30
8.0.270.0030.00317.26
8.0.260.0000.00716.69
8.0.250.0000.00716.89
8.0.240.0000.00616.88
8.0.230.0000.00716.88
8.0.220.0050.00216.84
8.0.210.0040.00416.73
8.0.200.0060.00316.89
8.0.190.0050.00316.79
8.0.180.0000.00816.86
8.0.170.0040.00416.88
8.0.160.0080.00016.82
8.0.150.0030.00316.86
8.0.140.0040.00716.74
8.0.130.0060.00013.23
8.0.120.0050.00316.81
8.0.110.0050.00316.73
8.0.100.0000.00716.66
8.0.90.0040.00416.70
8.0.80.0040.01216.85
8.0.70.0000.00716.70
8.0.60.0050.00316.71
8.0.50.0070.00016.79
8.0.30.0090.01217.01
8.0.20.0120.00817.40
8.0.10.0040.00417.03
8.0.00.0080.01016.91
7.4.330.0000.00516.79
7.4.320.0000.00716.34
7.4.300.0070.00016.51
7.4.290.0040.00416.52
7.4.280.0080.00016.54
7.4.270.0060.00016.51
7.4.260.0090.00016.51
7.4.250.0000.00716.40
7.4.240.0020.00516.65
7.4.230.0000.00716.71
7.4.220.0060.01216.54
7.4.210.0070.01416.47
7.4.200.0030.00316.59
7.4.160.0090.00616.55
7.4.150.0150.00917.40
7.4.140.0070.01417.86
7.4.130.0120.00616.50
7.4.120.0060.01116.47
7.4.110.0180.00316.20
7.4.100.0120.00616.44
7.4.90.0000.01616.71
7.4.80.0070.01019.39
7.4.70.0100.00716.44
7.4.60.0100.00716.46
7.4.50.0070.00716.38
7.4.40.0120.00316.41
7.4.30.0120.00616.36
7.4.00.0060.00915.09
7.3.330.0000.00513.29
7.3.320.0000.00513.44
7.3.310.0000.00816.23
7.3.300.0020.00516.21
7.3.290.0070.00916.36
7.3.280.0080.01116.32
7.3.270.0120.00617.40
7.3.260.0070.01116.25
7.3.250.0130.00916.29
7.3.240.0140.00316.59
7.3.230.0130.00316.40
7.3.210.0040.01216.38
7.3.200.0030.01319.39
7.3.190.0100.00616.62
7.3.180.0090.00616.25
7.3.170.0140.00316.27
7.3.160.0090.00616.22
7.2.330.0090.01216.30
7.2.320.0090.00916.71
7.2.310.0060.01116.36
7.2.300.0090.00916.81
7.2.290.0120.00616.73
7.2.60.0280.00616.99
7.2.00.0040.01119.38
7.1.200.0000.01315.83
7.1.100.0000.01317.75
7.1.70.0000.00717.18
7.1.60.0100.01319.20
7.1.50.0180.00934.80
7.1.00.0000.07722.33
7.0.200.0000.01116.69
7.0.60.0100.08021.66
7.0.50.0100.04317.97
7.0.40.0000.05020.28
7.0.30.0330.04720.09
7.0.20.0400.07320.26
7.0.10.0100.07720.12
7.0.00.0070.06720.16
5.6.280.0030.03021.12
5.6.210.0130.03720.46
5.6.200.0100.05018.15
5.6.190.0100.07320.45
5.6.180.0570.06720.46
5.6.170.0200.08020.42
5.6.160.0070.08320.45
5.6.150.0030.06718.23
5.6.140.0100.04718.18
5.6.130.0100.06318.19
5.6.120.0070.04321.13
5.6.110.0170.07320.95
5.6.100.0100.07321.02
5.6.90.0170.07320.98
5.6.80.0070.08020.40
5.5.350.0100.07320.44
5.5.340.0030.04018.05
5.5.330.0100.04020.40
5.5.320.0430.03720.25
5.5.310.0270.07720.34
5.5.300.0030.06717.95
5.5.290.0030.08317.98
5.5.280.0030.07020.80
5.5.270.0130.05720.68
5.5.260.0000.06320.65
5.5.250.0070.08720.59
5.5.240.0230.07020.15

preferences:
36.59 ms | 403 KiB | 5 Q