3v4l.org

run code in 300+ PHP versions simultaneously
<?php $some_objects = [ new SomeClass(1), new SomeClass(2), new SomeClass(3), new SomeClass(4), ]; $func = function(SomeClass $x) { $x->some_function(); return $x; }; array_walk($some_objects, $func); var_dump($some_objects); $mangled_result = array_map($func, $some_objects); var_dump($mangled_result); class SomeClass { private $number; public function __construct($number) { $this->number = $number; } public function some_function() { try { throw new Exception(); } catch (Exception $e) { MANGLE_SOMEHOW($e->getTrace()); } } } function MANGLE_SOMEHOW($trace) { foreach ($trace as $i => $frame) { if (isset($frame['args'])) { foreach ($frame['args'] as $arg_index => $arg_value) { // And here I was thinking this was a 'copy'??? $frame['args'][$arg_index] = $arg_value; } } } }

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.0120.00616.50
8.3.50.0130.00522.83
8.3.40.0120.00318.82
8.3.30.0120.00319.10
8.3.20.0080.00020.39
8.3.10.0060.00323.49
8.3.00.0050.00319.38
8.2.180.0110.00416.50
8.2.170.0100.01022.96
8.2.160.0070.00720.39
8.2.150.0000.00724.18
8.2.140.0060.00324.66
8.2.130.0070.00726.16
8.2.120.0050.00221.10
8.2.110.0090.00022.31
8.2.100.0080.00418.03
8.2.90.0030.00619.34
8.2.80.0080.00017.97
8.2.70.0050.00317.75
8.2.60.0000.00817.93
8.2.50.0070.00318.07
8.2.40.0090.00018.34
8.2.30.0050.00318.11
8.2.20.0060.00317.74
8.2.10.0000.00818.00
8.2.00.0000.00717.73
8.1.280.0060.00825.92
8.1.270.0070.00323.99
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00623.86
8.1.230.0070.00418.97
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0100.00317.47
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0030.00518.61
8.1.160.0050.00322.09
8.1.150.0000.00718.92
8.1.140.0040.00417.47
8.1.130.0000.00717.89
8.1.120.0070.00017.36
8.1.110.0040.00417.52
8.1.100.0040.00417.46
8.1.90.0070.00317.48
8.1.80.0040.00417.48
8.1.70.0040.00417.41
8.1.60.0000.00817.61
8.1.50.0060.00317.42
8.1.40.0050.00317.49
8.1.30.0000.00817.54
8.1.20.0040.00417.54
8.1.10.0040.00417.61
8.1.00.0060.00317.53
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.50
8.0.270.0000.00717.25
8.0.260.0030.00317.34
8.0.250.0000.00816.93
8.0.240.0110.00016.91
8.0.230.0000.00717.06
8.0.220.0030.00316.94
8.0.210.0040.00416.96
8.0.200.0000.00716.93
8.0.190.0000.00816.96
8.0.180.0000.00716.91
8.0.170.0000.00716.88
8.0.160.0050.00316.92
8.0.150.0000.00716.81
8.0.140.0040.00416.88
8.0.130.0030.00313.43
8.0.120.0040.00416.96
8.0.110.0040.00416.96
8.0.100.0000.00716.81
8.0.90.0040.00416.96
8.0.80.0070.01016.96
8.0.70.0070.00016.76
8.0.60.0030.00516.99
8.0.50.0000.00716.85
8.0.30.0120.01316.99
8.0.20.0120.00617.40
8.0.10.0040.00417.09
8.0.00.0100.00816.86
7.4.330.0050.00015.09
7.4.320.0030.00316.61
7.4.300.0060.00016.48
7.4.290.0030.00316.50
7.4.280.0060.00616.63
7.4.270.0040.00416.61
7.4.260.0040.00416.57
7.4.250.0000.00716.45
7.4.240.0020.00516.58
7.4.230.0070.00016.58
7.4.220.0070.01116.45
7.4.210.0080.00516.71
7.4.200.0040.00416.31
7.4.160.0150.00616.61
7.4.150.0060.01317.40
7.4.140.0220.00817.86
7.4.130.0100.00916.54
7.4.120.0080.01216.48
7.4.110.0030.01516.68
7.4.100.0060.01016.36
7.4.90.0100.01416.55
7.4.80.0180.00619.39
7.4.70.0120.00816.51
7.4.60.0100.00716.57
7.4.50.0040.00416.65
7.4.40.0110.00616.63
7.4.30.0090.00916.51
7.4.10.0100.01014.84
7.4.00.0080.01014.93
7.3.330.0020.00413.46
7.3.320.0000.00613.46
7.3.310.0030.00316.42
7.3.300.0030.00316.41
7.3.290.0030.01716.44
7.3.280.0090.00616.42
7.3.270.0100.01417.40
7.3.260.0090.01016.35
7.3.250.0130.00616.56
7.3.240.0130.00616.45
7.3.230.0110.00716.46
7.3.210.0110.00716.34
7.3.200.0160.00819.39
7.3.190.0060.00916.40
7.3.180.0070.01016.63
7.3.170.0060.01116.68
7.3.160.0140.00416.54
7.3.130.0090.00914.86
7.3.120.0120.00614.91
7.3.110.0080.01114.79
7.3.100.0110.00314.88
7.3.90.0000.01314.74
7.3.80.0060.00614.91
7.3.70.0030.00714.93
7.3.60.0090.00614.97
7.3.50.0060.00814.83
7.3.40.0040.00814.69
7.3.30.0080.00814.67
7.3.20.0130.00316.54
7.3.10.0120.00316.41
7.3.00.0050.00516.89
7.2.330.0060.01216.71
7.2.320.0180.00016.79
7.2.310.0100.01316.90
7.2.300.0070.01016.71
7.2.290.0110.00716.86
7.2.260.0000.01414.85
7.2.250.0110.00915.09
7.2.240.0030.01015.23
7.2.230.0100.00615.36
7.2.220.0040.01515.24
7.2.210.0060.00915.30
7.2.200.0080.00415.13
7.2.190.0130.00015.07
7.2.180.0100.00714.86
7.2.170.0090.00614.91
7.2.160.0130.00315.04
7.2.150.0060.00617.07
7.2.140.0070.00716.91
7.2.130.0040.01116.94
7.2.120.0080.00316.72
7.2.110.0040.00817.18
7.2.100.0120.00017.08
7.2.90.0000.01116.81
7.2.80.0040.01216.99
7.2.70.0070.00317.13
7.2.60.0100.00916.46
7.2.50.0060.01016.45
7.2.40.0070.00716.99
7.2.30.0060.00616.95
7.2.20.0030.00916.93
7.2.10.0000.01016.97
7.2.00.0050.00718.13
7.1.330.0040.01115.61
7.1.320.0000.00815.96
7.1.310.0180.00016.01
7.1.300.0040.01415.80
7.1.290.0030.01316.04
7.1.280.0060.00615.84
7.1.270.0100.00315.91
7.1.260.0100.00715.68
7.1.250.0100.00315.86
7.1.240.0070.00415.66
7.1.230.0050.00315.80
7.1.220.0040.01115.85
7.1.210.0070.00415.82
7.1.200.0090.00315.74
7.1.190.0100.00715.83
7.1.180.0090.00616.02
7.1.170.0040.00816.02
7.1.160.0030.00615.80
7.1.150.0060.00615.93
7.1.140.0000.01115.71
7.1.130.0030.00715.85
7.1.120.0070.00415.80
7.1.110.0040.00715.90
7.1.100.0070.00716.87
7.1.90.0000.01215.93
7.1.80.0040.00715.93
7.1.70.0060.00616.58
7.1.60.0050.00817.66
7.1.50.0070.01016.37
7.1.40.0080.00315.85
7.1.30.0090.00615.97
7.1.20.0000.01215.77
7.1.10.0050.00315.78
7.1.00.0090.03819.02
7.0.330.0130.00315.52
7.0.320.0000.01215.27
7.0.310.0060.00615.49
7.0.300.0070.00715.44
7.0.290.0060.00915.48
7.0.280.0040.00815.34
7.0.270.0090.00015.52
7.0.260.0070.00315.62
7.0.250.0000.01015.40
7.0.240.0000.00915.37
7.0.230.0060.00315.21
7.0.220.0000.01015.40
7.0.210.0030.01015.45
7.0.200.0060.00415.94
7.0.190.0080.00015.52
7.0.180.0030.00715.58
7.0.170.0000.00815.36
7.0.160.0030.00915.39
7.0.150.0040.00715.19
7.0.140.0000.04518.71
7.0.130.0060.01015.43
7.0.120.0040.00815.27
7.0.110.0030.01315.45
7.0.100.0080.00315.45
7.0.90.0070.00415.49
7.0.80.0080.00315.40
7.0.70.0070.00415.63
7.0.60.0090.03517.71
7.0.50.0050.02416.63
7.0.40.0050.02315.53
7.0.30.0040.02515.60
7.0.20.0050.02115.64
7.0.10.0040.02315.65
7.0.00.0060.04015.51
5.6.400.0070.00714.47
5.6.390.0000.01614.72
5.6.380.0120.00014.32
5.6.370.0000.00914.60
5.6.360.0070.00514.58
5.6.350.0040.00414.68
5.6.340.0070.00314.66
5.6.330.0060.00614.41
5.6.320.0070.00414.72
5.6.310.0060.00614.21
5.6.300.0080.00414.72
5.6.290.0000.01114.52
5.6.280.0040.03917.74
5.6.270.0040.00414.90
5.6.260.0070.00314.45
5.6.250.0100.00014.46
5.6.240.0030.00714.58
5.6.230.0100.00314.67
5.6.220.0040.00714.37
5.6.210.0050.02217.53
5.6.200.0070.02016.27
5.6.190.0020.02616.30
5.6.180.0050.02316.37
5.6.170.0000.02716.29
5.6.160.0060.03016.31
5.6.150.0050.02816.29
5.6.140.0050.04216.33
5.6.130.0030.05016.21
5.6.120.0050.02216.28
5.6.110.0000.04516.43
5.6.100.0090.04116.36
5.6.90.0080.04316.17
5.6.80.0030.04115.87
5.6.70.0040.04215.96
5.6.60.0050.04416.05
5.6.50.0070.04016.10
5.6.40.0050.03415.92
5.6.30.0080.04315.86
5.6.20.0030.04415.97
5.6.10.0070.02515.93
5.6.00.0100.03516.00
5.5.380.0000.01114.74
5.5.370.0080.00314.51
5.5.360.0070.00814.61
5.5.350.0140.03117.39
5.5.340.0030.02116.26
5.5.330.0050.02316.15
5.5.320.0020.02616.13
5.5.310.0040.02016.06
5.5.300.0030.04816.13
5.5.290.0090.04216.22
5.5.280.0130.02216.31
5.5.270.0070.04416.42
5.5.260.0080.04016.17
5.5.250.0060.04515.97
5.5.240.0090.04215.93
5.5.230.0050.04315.77
5.5.220.0030.02815.75
5.5.210.0070.04015.96
5.5.200.0090.04115.87
5.5.190.0050.04315.96
5.5.180.0040.02915.88
5.5.170.0040.00714.60
5.5.160.0080.04215.98
5.5.150.0020.04215.85
5.5.140.0070.03916.04
5.5.130.0020.03215.76
5.5.120.0060.02115.93
5.5.110.0070.04516.01
5.5.100.0100.04215.79
5.5.90.0050.04415.86
5.5.80.0080.04015.78
5.5.70.0030.04315.75
5.5.60.0040.02715.77
5.5.50.0030.02415.78
5.5.40.0070.02015.90
5.5.30.0040.03215.78
5.5.20.0120.03715.71
5.5.10.0070.04415.72
5.5.00.0030.04615.90
5.4.450.0040.03115.35
5.4.440.0020.04215.43
5.4.430.0080.03815.40
5.4.420.0050.04015.12
5.4.410.0110.02615.07
5.4.400.0070.02315.05
5.4.390.0060.04115.22
5.4.380.0040.04415.10
5.4.370.0050.03815.21
5.4.360.0070.04115.08
5.4.350.0020.03015.22
5.4.340.0030.04515.09
5.4.330.0000.01111.21
5.4.320.0020.04515.18
5.4.310.0050.04015.09
5.4.300.0080.03515.21
5.4.290.0050.03615.14
5.4.280.0090.03214.93
5.4.270.0090.01915.20
5.4.260.0050.04315.09
5.4.250.0070.02514.97
5.4.240.0090.03715.07
5.4.230.0180.01815.03
5.4.220.0030.04015.01
5.4.210.0110.03715.11
5.4.200.0020.02614.97
5.4.190.0120.03515.27
5.4.180.0050.03515.15
5.4.170.0070.04015.00
5.4.160.0110.02815.09
5.4.150.0070.03015.11
5.4.140.0080.03213.76
5.4.130.0000.04513.90
5.4.120.0030.04313.61
5.4.110.0110.02013.80
5.4.100.0100.03513.69
5.4.90.0080.03813.79
5.4.80.0060.04113.65
5.4.70.0070.02013.81
5.4.60.0080.04013.78
5.4.50.0060.04013.76
5.4.40.0100.03713.79
5.4.30.0030.02313.69
5.4.20.0080.03313.71
5.4.10.0040.03513.72
5.4.00.0090.03713.57
5.3.290.0070.06014.63
5.3.280.0070.04014.55
5.3.270.0170.06714.57
5.3.260.0100.07714.52
5.3.250.0030.07714.57
5.3.240.0070.07314.46
5.3.230.0000.08014.52
5.3.220.0030.04014.49
5.3.210.0030.07014.51
5.3.200.0070.06014.53
5.3.190.0000.05314.52
5.3.180.0030.08014.64
5.3.170.0030.07714.52
5.3.160.0030.04314.49
5.3.150.0030.04714.34
5.3.140.0100.04014.34
5.3.130.0000.06714.47
5.3.120.0170.05014.50
5.3.110.0100.07314.54
5.3.100.0000.04314.01
5.3.90.0030.04313.79
5.3.80.0100.04313.96
5.3.70.0030.06013.77
5.3.60.0000.08014.11
5.3.50.0130.07013.88
5.3.40.0030.07013.86
5.3.30.0000.05013.90
5.3.20.0100.03713.67
5.3.10.0100.04313.64
5.3.00.0100.06713.59
5.2.170.0000.06311.18
5.2.160.0070.04711.18
5.2.150.0070.06011.12
5.2.140.0000.03311.09
5.2.130.0030.02711.13
5.2.120.0000.03310.93
5.2.110.0030.04011.24
5.2.100.0030.03011.07
5.2.90.0070.03011.13
5.2.80.0000.03310.91
5.2.70.0070.03311.08
5.2.60.0070.03310.97
5.2.50.0100.06010.99
5.2.40.0030.05710.96
5.2.30.0100.05710.88
5.2.20.0000.04710.95
5.2.10.0030.06010.93
5.2.00.0070.05710.68
5.1.60.0070.05010.14
5.1.50.0030.03310.04
5.1.40.0030.04710.01
5.1.30.0070.04710.35
5.1.20.0100.02310.49
5.1.10.0000.0509.91
5.1.00.0000.06010.05
5.0.50.0030.0438.66
5.0.40.0070.0478.66
5.0.30.0000.0338.66
5.0.20.0030.0338.66
5.0.10.0030.0308.66
5.0.00.0030.0378.66
4.4.90.0000.0378.66
4.4.80.0000.0338.66
4.4.70.0030.0378.66
4.4.60.0000.0338.66
4.4.50.0030.0208.66
4.4.40.0000.0438.66
4.4.30.0000.0408.66
4.4.20.0000.0178.66
4.4.10.0000.0208.66
4.4.00.0000.0608.66
4.3.110.0000.0178.66
4.3.100.0000.0178.66
4.3.90.0070.0208.66
4.3.80.0030.0408.66
4.3.70.0000.0438.66
4.3.60.0000.0408.66
4.3.50.0000.0408.66
4.3.40.0000.0538.66
4.3.30.0000.0278.66
4.3.20.0070.0308.66
4.3.10.0000.0338.66
4.3.00.0000.0278.66

preferences:
43.58 ms | 401 KiB | 5 Q