3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple"); function test_alter(&$item1, $key, $prefix) { $item1 = "$prefix: $item1"; } function test_print($item2, $key) { echo "$key. $item2<br />\n"; } echo "Before ...:\n"; array_walk($fruits, 'test_print'); array_walk($fruits, 'test_alter', 'fruit'); echo "... and after:\n"; array_walk($fruits, 'test_print'); ?>

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.0130.00716.63
8.3.50.0080.00821.91
8.3.40.0040.01118.67
8.3.30.0100.00319.14
8.3.20.0080.00020.21
8.3.10.0050.00323.70
8.3.00.0000.00718.93
8.2.180.0070.00718.16
8.2.170.0040.01422.96
8.2.160.0100.00320.57
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0040.00420.75
8.2.110.0050.00522.07
8.2.100.0100.00020.48
8.2.90.0040.00419.07
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0040.00417.79
8.2.50.0050.00318.07
8.2.40.0000.00920.95
8.2.30.0040.00418.26
8.2.20.0040.00417.69
8.2.10.0000.00718.19
8.2.00.0000.00817.76
8.1.280.0070.00725.92
8.1.270.0050.00323.96
8.1.260.0030.00526.35
8.1.250.0060.00328.09
8.1.240.0070.00323.91
8.1.230.0080.00419.04
8.1.220.0040.00417.79
8.1.210.0050.00518.77
8.1.200.0030.00617.23
8.1.190.0000.00817.13
8.1.180.0040.00418.10
8.1.170.0090.00018.70
8.1.160.0040.00421.95
8.1.150.0000.00718.59
8.1.140.0000.00717.39
8.1.130.0000.00717.83
8.1.120.0040.00417.43
8.1.110.0030.00617.46
8.1.100.0000.00817.41
8.1.90.0000.00717.30
8.1.80.0030.00317.45
8.1.70.0000.00717.41
8.1.60.0000.01117.46
8.1.50.0000.00717.36
8.1.40.0050.00317.50
8.1.30.0090.00017.63
8.1.20.0050.00217.48
8.1.10.0050.00317.51
8.1.00.0030.00617.33
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.38
8.0.270.0070.00017.27
8.0.260.0030.00317.32
8.0.250.0070.00016.94
8.0.240.0000.00716.83
8.0.230.0030.00317.00
8.0.220.0000.00616.92
8.0.210.0060.00016.80
8.0.200.0000.00616.96
8.0.190.0060.00316.91
8.0.180.0070.00016.91
8.0.170.0040.00416.93
8.0.160.0000.00816.87
8.0.150.0070.00016.81
8.0.140.0000.00716.76
8.0.130.0050.00013.32
8.0.120.0000.00816.87
8.0.110.0070.00016.92
8.0.100.0050.00216.76
8.0.90.0070.00016.77
8.0.80.0080.00816.94
8.0.70.0080.00016.93
8.0.60.0040.00416.83
8.0.50.0000.00816.89
8.0.30.0090.01017.06
8.0.20.0140.00817.40
8.0.10.0000.00816.82
8.0.00.0180.00016.76
7.4.330.0050.00015.00
7.4.320.0070.00016.30
7.4.300.0050.00316.58
7.4.290.0040.00416.57
7.4.280.0040.00416.45
7.4.270.0030.00316.37
7.4.260.0040.00416.54
7.4.250.0000.00716.48
7.4.240.0040.00416.46
7.4.230.0000.00716.63
7.4.220.0060.01316.59
7.4.210.0030.01016.57
7.4.200.0050.00216.29
7.4.190.0070.00016.50
7.4.160.0130.00416.45
7.4.150.0060.01317.40
7.4.140.0090.01017.86
7.4.130.0050.01516.46
7.4.120.0120.00516.49
7.4.110.0070.01416.48
7.4.100.0030.01816.57
7.4.90.0090.00916.45
7.4.80.0090.00919.39
7.4.70.0090.00616.42
7.4.60.0060.01016.47
7.4.50.0060.00316.41
7.4.40.0090.01216.47
7.4.30.0050.01116.42
7.4.00.0100.00315.09
7.3.330.0030.00313.23
7.3.320.0050.00013.06
7.3.310.0070.00016.31
7.3.300.0030.00316.19
7.3.290.0130.00316.38
7.3.280.0070.01016.32
7.3.270.0130.00517.40
7.3.260.0060.01716.43
7.3.250.0090.00716.45
7.3.240.0060.02016.32
7.3.230.0030.01316.39
7.3.210.0100.00716.42
7.3.200.0070.01019.39
7.3.190.0040.01216.48
7.3.180.0140.00716.31
7.3.170.0050.01116.42
7.3.160.0060.01316.44
7.3.120.0030.01014.85
7.3.00.0220.00715.56
7.2.330.0030.01816.66
7.2.320.0090.00916.34
7.2.310.0080.00816.63
7.2.300.0190.00416.55
7.2.290.0110.00716.55
7.2.130.0040.01116.67
7.2.120.0070.00716.78
7.2.110.0000.01416.76
7.2.100.0030.00616.88
7.2.90.0130.00717.03
7.2.80.0070.00717.03
7.2.70.0070.00716.59
7.2.60.0100.00816.70
7.2.50.0100.00316.80
7.2.40.0060.01018.22
7.2.30.0110.00918.27
7.2.20.0100.00918.19
7.2.10.0040.01218.11
7.2.00.0050.01318.14
7.1.250.0040.00715.70
7.1.240.0180.00015.60
7.1.230.0130.00315.40
7.1.220.0080.00815.82
7.1.210.0000.01715.78
7.1.200.0070.00715.67
7.1.190.0030.01015.46
7.1.180.0060.00615.75
7.1.170.0100.01015.60
7.1.160.0070.01117.09
7.1.150.0050.01316.96
7.1.140.0060.01117.07
7.1.130.0070.00717.19
7.1.120.0060.01117.04
7.1.110.0150.00816.56
7.1.100.0140.00816.92
7.1.90.0170.01016.35
7.1.80.0220.00916.52
7.1.70.0110.00816.30
7.1.60.0220.00925.25
7.1.50.0190.00925.05
7.1.40.0190.01324.74
7.1.30.0210.01024.92
7.1.20.0430.01124.94
7.1.10.0140.00915.96
7.1.00.0150.00815.96
7.0.330.0030.00915.02
7.0.320.0110.00714.94
7.0.310.0100.00315.20
7.0.300.0030.00815.19
7.0.290.0110.00916.68
7.0.280.0070.00715.09
7.0.270.0090.00816.72
7.0.260.0110.00916.55
7.0.250.0210.00616.01
7.0.240.0240.00916.07
7.0.230.0140.00816.18
7.0.220.0210.00716.29
7.0.210.0170.00815.60
7.0.200.0150.00715.91
7.0.190.0130.00815.83
7.0.180.0210.00815.66
7.0.170.0170.00915.61
7.0.160.0180.00915.67
7.0.150.0130.00915.63
7.0.140.0180.01015.73
7.0.130.0150.00715.76
7.0.120.0130.01015.92
7.0.110.0230.00815.66
7.0.100.0200.01115.62
7.0.90.0190.00815.64
7.0.80.0130.00815.69
7.0.70.0140.00815.57
7.0.60.0150.01015.45
7.0.50.0130.00915.70
7.0.40.0150.01015.25
7.0.30.0130.00715.30
7.0.20.0140.00815.29
7.0.10.0150.01215.18
7.0.00.0170.00915.18
5.6.380.0030.01014.39
5.6.370.0080.00313.98
5.6.360.0030.00914.38
5.6.350.0030.00613.99
5.6.340.0090.00614.46
5.6.330.0030.00914.21
5.6.320.0000.01414.47
5.6.310.0030.01014.22
5.6.300.0090.04619.16
5.6.290.0120.04619.21
5.6.280.0130.04119.22
5.6.270.0110.04419.24
5.6.260.0120.04619.10
5.6.250.0120.04519.27
5.6.240.0110.05219.19
5.6.230.0130.04619.17
5.6.220.0110.04519.14
5.6.210.0080.04719.22
5.6.200.0070.04419.20
5.6.190.0130.04419.06
5.6.180.0120.03919.25
5.6.170.0130.04419.20
5.6.160.0130.05019.07
5.6.150.0090.05019.12
5.6.140.0110.05619.16
5.6.130.0130.04219.08
5.6.120.0090.06319.12
5.6.110.0100.05519.16
5.6.100.0130.04519.20
5.6.90.0130.05019.09
5.6.80.0080.04818.69
5.6.70.0100.04618.70
5.6.60.0120.04318.53
5.6.50.0130.04318.67
5.6.40.0120.04218.58
5.6.30.0090.04318.58
5.6.20.0140.04818.56
5.6.10.0130.04618.66
5.6.00.0100.04218.73
5.5.380.0060.04315.95
5.5.370.0100.04115.90
5.5.360.0080.04615.91
5.5.350.0120.03415.89
5.5.340.0130.03716.37
5.5.330.0090.04216.32
5.5.320.0110.04116.28
5.5.310.0050.05316.34
5.5.300.0090.04916.25
5.5.290.0100.04116.38
5.5.280.0080.04816.20
5.5.270.0140.05216.26
5.5.260.0090.04516.23
5.5.250.0120.04516.12
5.5.240.0110.03915.83
5.5.230.0090.05315.73
5.5.220.0140.03715.70
5.5.210.0060.04715.75
5.5.200.0080.04215.77
5.5.190.0110.04115.70
5.5.180.0140.04115.82
5.5.170.0060.00011.18
5.5.160.0130.03915.72
5.5.150.0090.04015.68
5.5.140.0100.05115.75
5.5.130.0060.04315.74
5.5.120.0110.03915.73
5.5.110.0070.04315.70
5.5.100.0100.04015.78
5.5.90.0050.04815.67
5.5.80.0080.04015.72
5.5.70.0100.04215.60
5.5.60.0100.04615.73
5.5.50.0110.04115.70
5.5.40.0110.04715.73
5.5.30.0090.04015.68
5.5.20.0110.04115.70
5.5.10.0060.04115.72
5.5.00.0120.04615.78
5.4.450.0090.04817.21
5.4.440.0120.04117.21
5.4.430.0070.04317.25
5.4.420.0080.04317.38
5.4.410.0180.04417.19
5.4.400.0110.04017.05
5.4.390.0100.04317.07
5.4.380.0080.04517.05
5.4.370.0090.04417.04
5.4.360.0130.03917.10
5.4.350.0120.04517.07
5.4.340.0070.04817.08
5.4.330.0070.00411.18
5.4.320.0080.04617.06
5.4.310.0070.03917.06
5.4.300.0100.04717.03
5.4.290.0090.03817.01
5.4.280.0070.04917.10
5.4.270.0080.04017.07
5.4.260.0090.04117.15
5.4.250.0090.04617.08
5.4.240.0080.04517.06
5.4.230.0090.04117.05
5.4.220.0150.04517.08
5.4.210.0120.04617.11
5.4.200.0070.04217.08
5.4.190.0130.04017.02
5.4.180.0130.03717.01
5.4.170.0120.04317.03
5.4.160.0090.03717.04
5.4.150.0120.04317.01
5.4.140.0090.03815.36
5.4.130.0100.03715.35
5.4.120.0090.04215.35
5.4.110.0070.04015.38
5.4.100.0140.03615.32
5.4.90.0080.03615.38
5.4.80.0070.03815.27
5.4.70.0130.04015.31
5.4.60.0080.03715.33
5.4.50.0060.04315.28
5.4.40.0080.03515.27
5.4.30.0090.04015.29
5.4.20.0090.03815.34
5.4.10.0080.03615.28
5.4.00.0090.03815.00
5.3.290.0080.03914.42
5.3.280.0070.04014.38
5.3.270.0100.04214.36
5.3.260.0080.04014.43
5.3.250.0110.04014.43
5.3.240.0100.04314.33
5.3.230.0080.03814.40
5.3.220.0060.04114.27
5.3.210.0090.04514.36
5.3.200.0090.03514.41
5.3.190.0160.03314.36
5.3.180.0120.03514.32
5.3.170.0110.03214.44
5.3.160.0110.03614.40
5.3.150.0080.03914.44
5.3.140.0100.04514.44
5.3.130.0060.04414.38
5.3.120.0060.04014.44
5.3.110.0110.03714.43
5.3.100.0100.03914.06
5.3.90.0060.03914.06
5.3.80.0080.03714.16
5.3.70.0120.03614.11
5.3.60.0100.03814.08
5.3.50.0120.03514.06
5.3.40.0050.03714.04
5.3.30.0070.03314.03
5.3.20.0120.03513.94
5.3.10.0040.03713.96
5.3.00.0090.03613.92

preferences:
46.11 ms | 401 KiB | 5 Q