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.4.120.0150.00524.28
8.4.110.0060.00318.88
8.4.100.0130.00718.69
8.4.90.0100.00317.62
8.4.80.0040.00417.80
8.4.70.0050.01017.55
8.4.60.0120.00918.77
8.4.50.0130.00923.89
8.4.40.0000.01919.43
8.4.30.0030.00518.65
8.4.20.0100.01019.60
8.4.10.0170.00323.60
8.3.250.0120.00618.85
8.3.240.0110.00816.46
8.3.230.0080.01016.36
8.3.220.0130.00517.37
8.3.210.0110.00616.72
8.3.200.0110.01016.64
8.3.190.0120.00716.90
8.3.180.0130.00618.41
8.3.170.0090.00917.14
8.3.160.0110.00718.87
8.3.150.0090.00918.44
8.3.140.0080.00017.03
8.3.130.0050.00318.52
8.3.120.0090.00018.86
8.3.110.0060.00320.94
8.3.100.0050.00324.06
8.3.90.0050.00326.77
8.3.80.0060.00318.30
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.290.0090.00720.54
8.2.280.0120.00618.49
8.2.270.0070.01117.00
8.2.260.0060.00316.57
8.2.250.0100.00716.80
8.2.240.0030.00717.07
8.2.230.0040.00422.58
8.2.220.0110.00737.54
8.2.210.0070.00726.77
8.2.200.0040.00416.50
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.330.0040.00416.02
8.1.320.0090.01016.07
8.1.310.0180.00018.35
8.1.300.0120.00320.32
8.1.290.0090.00030.84
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:
70.49 ms | 403 KiB | 5 Q