3v4l.org

run code in 300+ PHP versions simultaneously
<?php function trim_value(&$value) { $value = str_replace("\0", "", $value); } $fruit = array('apple','banana ', ' cran berry '); var_dump($fruit); array_walk($fruit, 'trim_value'); var_dump($fruit); ?>

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.00616.63
8.3.50.0110.00716.16
8.3.40.0040.01118.58
8.3.30.0070.00718.36
8.3.20.0040.00421.73
8.3.10.0050.00323.51
8.3.00.0050.00221.92
8.2.180.0080.00818.27
8.2.170.0120.00622.96
8.2.160.0070.00720.28
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00421.00
8.2.120.0040.00426.35
8.2.110.0000.01019.30
8.2.100.0080.00417.91
8.2.90.0040.00419.72
8.2.80.0040.00418.09
8.2.70.0040.00417.91
8.2.60.0000.00817.50
8.2.50.0050.00218.10
8.2.40.0030.00620.21
8.2.30.0000.00720.52
8.2.20.0040.00418.09
8.2.10.0030.00618.04
8.2.00.0000.00818.09
8.1.280.0070.01125.92
8.1.270.0040.00422.09
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00322.42
8.1.230.0060.00620.95
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.22
8.1.190.0030.00617.35
8.1.180.0000.00718.10
8.1.170.0060.00318.72
8.1.160.0000.00818.80
8.1.150.0030.00320.30
8.1.140.0000.00717.73
8.1.130.0000.00719.00
8.1.120.0050.00317.36
8.1.110.0090.00017.43
8.1.100.0040.00417.42
8.1.90.0000.00817.27
8.1.80.0030.00317.39
8.1.70.0040.00417.41
8.1.60.0000.00817.55
8.1.50.0000.00817.46
8.1.40.0000.00917.37
8.1.30.0040.00717.50
8.1.20.0000.00717.57
8.1.10.0000.00717.38
8.1.00.0030.00717.47
8.0.300.0000.00719.90
8.0.290.0080.00016.63
8.0.280.0030.00318.41
8.0.270.0030.00317.18
8.0.260.0060.00316.65
8.0.250.0000.00716.70
8.0.240.0030.00516.88
8.0.230.0040.00416.88
8.0.220.0060.00316.82
8.0.210.0030.00516.86
8.0.200.0040.00416.89
8.0.190.0050.00316.86
8.0.180.0040.00416.83
8.0.170.0030.00616.83
8.0.160.0030.00316.70
8.0.150.0000.00716.71
8.0.140.0030.00516.73
8.0.130.0000.00613.25
8.0.120.0070.00016.77
8.0.110.0070.00016.82
8.0.100.0000.00716.64
8.0.90.0080.00016.71
8.0.80.0130.00716.77
8.0.70.0040.00416.76
8.0.60.0040.00416.63
8.0.50.0000.00716.70
8.0.30.0080.01016.91
8.0.20.0100.00917.40
8.0.10.0020.00516.94
8.0.00.0130.00716.71
7.4.330.0000.00615.55
7.4.320.0060.00016.45
7.4.300.0000.00616.34
7.4.290.0050.00216.51
7.4.280.0040.00416.55
7.4.270.0060.00316.47
7.4.260.0000.00916.37
7.4.250.0070.00016.30
7.4.240.0030.00316.40
7.4.230.0030.00316.29
7.4.220.0000.00716.59
7.4.210.0090.00916.42
7.4.200.0030.00316.48
7.4.160.0110.00616.38
7.4.140.0110.00717.86
7.4.130.0120.01216.49
7.4.120.0110.00816.44
7.4.110.0060.01016.46
7.4.100.0100.00716.40
7.4.90.0110.00716.32
7.4.80.0050.01919.39
7.4.70.0070.01516.14
7.4.60.0090.00616.29
7.4.50.0070.01016.40
7.4.40.0100.00716.30
7.4.00.0060.01014.80
7.3.330.0030.00313.19
7.3.320.0060.00013.04
7.3.310.0070.00016.16
7.3.300.0030.00316.08
7.3.290.0070.01116.14
7.3.280.0120.00916.22
7.3.260.0080.01416.28
7.3.240.0080.01016.44
7.3.230.0060.01116.20
7.3.210.0120.00616.24
7.3.200.0080.00816.39
7.3.190.0130.00316.24
7.3.180.0030.01616.09
7.3.170.0120.00416.48
7.3.160.0000.01516.36
7.3.120.0070.01014.73
7.3.110.0100.00814.84
7.3.100.0050.00814.86
7.3.90.0060.00814.52
7.3.80.0070.00714.64
7.3.70.0060.00814.43
7.3.60.0070.00914.74
7.3.50.0020.01014.73
7.3.40.0060.00914.72
7.3.30.0110.00414.51
7.3.20.0080.00816.38
7.3.10.0060.01016.54
7.3.00.0090.00516.56
7.2.330.0040.01316.53
7.2.320.0150.00916.68
7.2.310.0090.00616.30
7.2.300.0150.00816.64
7.2.290.0130.00716.40
7.2.250.0080.01015.10
7.2.240.0100.00514.78
7.2.230.0070.01114.96
7.2.220.0040.00814.81
7.2.210.0020.01014.97
7.2.200.0050.01014.99
7.2.190.0060.00614.75
7.2.180.0110.00514.85
7.2.170.0050.01014.75
7.2.60.0030.00916.66
7.2.30.0080.01019.52
7.2.20.0100.00919.32
7.2.10.0070.01519.33
7.2.00.0090.01019.50
7.1.330.0140.00215.83
7.1.320.0030.00915.61
7.1.310.0060.00615.69
7.1.300.0050.00715.54
7.1.290.0080.00515.53
7.1.280.0090.00615.52
7.1.270.0030.00915.74
7.1.260.0070.00915.91
7.1.200.0110.00015.66
7.1.150.0090.01417.84
7.1.140.0050.01318.50
7.1.130.0060.01018.40
7.1.120.0110.01118.55
7.1.110.0080.01117.91
7.1.100.0060.01017.83
7.1.90.0110.01417.52
7.1.80.0080.01517.97
7.1.70.0080.01017.02
7.1.60.0270.01234.93
7.1.50.0310.00934.66
7.1.40.0230.01434.54
7.1.30.0300.01634.34
7.1.20.0220.01434.55
7.1.10.0060.01716.75
7.1.00.0100.01116.82

preferences:
58.9 ms | 401 KiB | 5 Q