3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { function foo(&$a, $b) { $a = 'modified'; $b = 'modified'; } } class S { static function foo(&$a, $b) { $a = 'modified'; $b = 'modified'; } } $a = $b = 'orig'; $f = array(new C, 'foo'); $f($a, $b); assert($a === 'modified'); assert($b === 'orig'); $a = $b = 'orig'; $f = array('S', 'foo'); $f($a, $b); assert($a === 'modified'); assert($b === 'orig'); $a = $b = 'orig'; $f = 'S::foo'; $f($a, $b); assert($a === 'modified'); assert($b === 'orig'); $a = $b = 'orig'; $f = function(&$a, $b) { $a = 'modified'; $b = 'modified'; }; $f($a, $b); assert($a === 'modified'); assert($b === 'orig');

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.70.0040.01116.50
8.3.60.0160.00718.43
8.3.50.0140.00522.78
8.3.40.0090.00918.84
8.3.30.0070.00718.79
8.3.20.0070.00020.34
8.3.10.0040.00421.84
8.3.00.0080.00019.79
8.2.180.0060.00918.42
8.2.170.0120.00322.96
8.2.160.0100.00319.46
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0030.00721.02
8.2.120.0070.00026.35
8.2.110.0090.00019.45
8.2.100.0120.00018.34
8.2.90.0030.00719.40
8.2.80.0040.00417.97
8.2.70.0030.00517.63
8.2.60.0030.00517.92
8.2.50.0080.00018.10
8.2.40.0040.00420.46
8.2.30.0080.00019.32
8.2.20.0080.00017.68
8.2.10.0070.00018.22
8.2.00.0070.00018.14
8.1.280.0060.00825.92
8.1.270.0000.01023.79
8.1.260.0070.00328.09
8.1.250.0080.00028.09
8.1.240.0060.00321.34
8.1.230.0060.00619.48
8.1.220.0000.00817.76
8.1.210.0030.00518.77
8.1.200.0100.00017.23
8.1.190.0030.00517.23
8.1.180.0080.00018.10
8.1.170.0060.00318.65
8.1.160.0000.00822.21
8.1.150.0000.00718.91
8.1.140.0040.00419.53
8.1.130.0030.00617.76
8.1.120.0060.00317.48
8.1.110.0040.00417.48
8.1.100.0000.00817.49
8.1.90.0030.00517.49
8.1.80.0040.00417.44
8.1.70.0040.00417.47
8.1.60.0060.00317.63
8.1.50.0030.00617.41
8.1.40.0000.00817.41
8.1.30.0040.00417.66
8.1.20.0050.00217.73
8.1.10.0000.00717.63
8.1.00.0020.00517.50
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.44
8.0.270.0070.00017.27
8.0.260.0060.00017.18
8.0.250.0030.00517.05
8.0.240.0050.00317.05
8.0.230.0020.00517.06
8.0.220.0070.00016.94
8.0.210.0000.00716.94
8.0.200.0030.00316.93
8.0.190.0000.00716.91
8.0.180.0040.00416.88
8.0.170.0000.00916.96
8.0.160.0040.00416.83
8.0.150.0030.00316.98
8.0.140.0120.00016.93
8.0.130.0050.00013.41
8.0.120.0040.00416.91
8.0.110.0000.00717.01
8.0.100.0040.00416.97
8.0.90.0030.00316.77
8.0.80.0090.00616.96
8.0.70.0070.00016.99
8.0.60.0000.00716.92
8.0.50.0070.00016.96
8.0.30.0100.00916.99
8.0.20.0090.01117.40
8.0.10.0040.00416.86
8.0.00.0110.00716.95
7.4.330.0000.00515.08
7.4.320.0000.00716.50
7.4.300.0000.00616.47
7.4.290.0030.00316.50
7.4.280.0000.00816.43
7.4.270.0070.00016.52
7.4.260.0000.00716.39
7.4.250.0000.00716.58
7.4.240.0000.00716.66
7.4.230.0070.00016.59
7.4.220.0090.00616.71
7.4.210.0050.01316.56
7.4.200.0000.00716.61
7.4.160.0140.00616.38
7.4.150.0110.00817.40
7.4.140.0100.00817.86
7.4.130.0130.00616.64
7.4.120.0130.00816.47
7.4.110.0200.00316.39
7.4.100.0150.00316.47
7.4.90.0070.01116.45
7.4.80.0030.01719.39
7.4.70.0080.01316.57
7.4.60.0060.01016.53
7.4.50.0080.00616.46
7.4.40.0130.00316.61
7.4.30.0070.01016.56
7.4.00.0100.00714.75
7.3.330.0030.00313.23
7.3.320.0030.00313.40
7.3.310.0070.00016.47
7.3.300.0070.00016.45
7.3.290.0030.00316.42
7.3.280.0100.00916.45
7.3.270.0100.00717.40
7.3.260.0090.01116.57
7.3.250.0100.01016.34
7.3.240.0120.00616.41
7.3.230.0040.01216.54
7.3.210.0110.00716.30
7.3.200.0080.00816.35
7.3.190.0100.01016.30
7.3.180.0070.01016.43
7.3.170.0100.00716.44
7.3.160.0110.00716.60
7.2.330.0030.01416.74
7.2.320.0130.00716.68
7.2.310.0120.00416.60
7.2.300.0100.01016.85
7.2.290.0150.00316.50
7.2.60.0060.00916.94
7.2.00.0000.01319.25
7.1.200.0060.00915.72
7.1.100.0000.01417.77
7.1.70.0040.00417.28
7.1.60.0040.01119.45
7.1.50.0000.02017.02
7.1.00.0070.07022.31
7.0.200.0000.00916.78
7.0.80.0200.06320.00
7.0.70.0170.06019.91
7.0.60.0200.06319.87
7.0.50.0130.07020.42
7.0.40.0200.06020.28
7.0.30.0170.06720.39
7.0.20.0300.05720.38
7.0.10.0200.06020.37
7.0.00.0330.05320.46
5.6.230.0030.06720.64
5.6.220.0170.05020.60
5.6.210.0130.06320.88
5.6.200.0070.06321.11
5.6.190.0100.05721.04
5.6.180.0070.06021.07
5.6.170.0070.06321.11
5.6.160.0130.05321.02
5.6.150.0070.06321.18
5.6.140.0130.05321.15
5.6.130.0170.06021.18
5.6.120.0100.06321.03
5.6.110.0030.06721.07
5.6.100.0130.05721.08
5.6.90.0100.06721.18
5.6.80.0030.06320.57
5.6.70.0100.06320.42
5.6.60.0070.05720.40
5.6.50.0100.05720.54
5.6.40.0030.06320.45
5.6.30.0130.05320.36
5.6.20.0130.05320.54
5.6.10.0230.04320.46
5.6.00.0230.04320.38

preferences:
60.01 ms | 404 KiB | 6 Q