3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'a' => 'food', 'b' => 'foo', 'c' => 'goo', 'd' => 'foo', 'e' => 'good' ]; $needle = 'foo'; $newValue = 'bar'; var_export( array_map(fn($v) => $v === $needle ? $newValue : $v, $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.3.70.0150.00016.58
8.3.60.0110.01116.75
8.3.50.0140.00018.22
8.3.40.0120.00320.22
8.3.30.0150.00018.54
8.3.20.0070.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.190.0090.00616.58
8.2.180.0110.00325.92
8.2.170.0090.00618.79
8.2.160.0080.00822.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00621.16
8.2.110.0030.00622.19
8.2.100.0090.00317.78
8.2.90.0000.00817.93
8.2.80.0060.00317.97
8.2.70.0060.00317.93
8.2.60.0000.00818.09
8.2.50.0030.00618.10
8.2.40.0090.00021.04
8.2.30.0060.00318.00
8.2.20.0040.00419.25
8.2.10.0030.00618.12
8.2.00.0100.00717.62
8.1.280.0100.00725.92
8.1.270.0040.00424.66
8.1.260.0090.00626.35
8.1.250.0070.00028.09
8.1.240.0000.01020.91
8.1.230.0070.00318.82
8.1.220.0000.00917.74
8.1.210.0000.00918.77
8.1.200.0070.00417.38
8.1.190.0040.00417.25
8.1.180.0050.00218.10
8.1.170.0030.00618.65
8.1.160.0040.00418.88
8.1.150.0040.00418.64
8.1.140.0050.00317.36
8.1.130.0050.01117.48
8.1.120.0130.00317.55
8.1.110.0000.01517.47
8.1.100.0080.00817.34
8.1.90.0110.00417.50
8.1.80.0080.00817.50
8.1.70.0100.00517.55
8.1.60.0120.00417.69
8.1.50.0110.00617.48
8.1.40.0140.00517.54
8.1.30.0110.00417.60
8.1.20.0140.00417.67
8.1.10.0140.00617.59
8.1.00.0000.01017.50
8.0.300.0090.00218.77
8.0.290.0040.00416.63
8.0.280.0070.00018.36
8.0.270.0000.00717.19
8.0.260.0150.00016.87
8.0.250.0060.01016.91
8.0.240.0110.00416.87
8.0.230.0120.00316.90
8.0.220.0100.00616.87
8.0.210.0090.01016.87
8.0.200.0080.00416.87
8.0.190.0060.01116.87
8.0.180.0090.00616.87
8.0.170.0100.00316.87
8.0.160.0110.00316.88
8.0.150.0110.00316.87
8.0.140.0150.00016.87
8.0.130.0070.00716.87
8.0.120.0160.00016.87
8.0.110.0090.00516.87
8.0.100.0060.00916.87
8.0.90.0070.00716.87
8.0.80.0070.00716.87
8.0.70.0070.00716.87
8.0.60.0110.00416.87
8.0.50.0140.00216.87
8.0.30.0120.00416.87
8.0.20.0080.00516.87
8.0.10.0070.00816.87

preferences:
37.31 ms | 401 KiB | 5 Q