3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['work', 'homework', 'home', 'sky', 'door']; $keep = ['work', 'home']; $lookup = array_combine($keep, $keep); var_export( array_map(fn($v) => $lookup[$v] ?? 0, $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.130.0040.01518.23
8.3.120.0060.00318.90
8.3.110.0070.00420.94
8.3.100.0040.00424.06
8.3.90.0080.00026.77
8.3.80.0060.00316.57
8.3.70.0120.00416.63
8.3.60.0120.00618.43
8.3.50.0110.01120.18
8.3.40.0070.01118.73
8.3.30.0110.00418.67
8.3.20.0050.00324.18
8.3.10.0040.00424.66
8.3.00.0030.00526.16
8.2.250.0130.00618.55
8.2.240.0040.00418.53
8.2.230.0040.00422.58
8.2.220.0080.00037.54
8.2.210.0140.00426.77
8.2.200.0060.00816.75
8.2.190.0080.00816.58
8.2.180.0110.00325.92
8.2.170.0130.00718.75
8.2.160.0120.00322.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0030.00622.11
8.2.100.0030.00817.78
8.2.90.0040.00419.09
8.2.80.0060.00318.12
8.2.70.0030.00617.75
8.2.60.0030.00518.05
8.2.50.0050.00318.07
8.2.40.0080.00017.84
8.2.30.0050.00218.18
8.2.20.0000.00720.48
8.2.10.0040.00417.80
8.2.00.0070.00019.37
8.1.300.0030.00617.96
8.1.290.0070.00330.84
8.1.280.0070.00725.92
8.1.270.0060.00323.99
8.1.260.0050.00326.35
8.1.250.0090.00028.09
8.1.240.0030.00623.87
8.1.230.0040.00719.16
8.1.220.0070.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0030.00617.35
8.1.180.0060.00318.10
8.1.170.0000.00818.59
8.1.160.0000.00718.89
8.1.150.0050.00218.50
8.1.140.0080.00017.45
8.1.130.0030.00320.13
8.1.120.0040.00417.42
8.1.110.0050.00317.35
8.1.100.0000.01017.45
8.1.90.0040.00417.46
8.1.80.0030.00617.44
8.1.70.0030.00517.52
8.1.60.0040.00417.54
8.1.50.0040.00417.57
8.1.40.0040.00417.37
8.1.30.0050.00317.56
8.1.20.0230.00017.47
8.1.10.0210.00317.44
8.1.00.0210.00317.25
8.0.300.0000.00718.77
8.0.290.0070.00017.16
8.0.280.0040.00418.44
8.0.270.0030.00317.16
8.0.260.0000.00618.51
8.0.250.0050.00316.98
8.0.240.0000.00616.94
8.0.230.0040.00416.82
8.0.220.0030.00316.82
8.0.210.0000.00716.83
8.0.200.0000.00816.80
8.0.190.0000.01116.98
8.0.180.0040.00416.86
8.0.170.0040.00416.84
8.0.160.0040.00416.77
8.0.150.0130.00616.80
8.0.140.0130.00616.86
8.0.130.0160.00616.73
8.0.120.0210.00016.84
8.0.110.0120.00816.79
8.0.100.0180.00316.67
8.0.90.0150.00816.84
8.0.80.0120.00816.78
8.0.70.0170.00416.70
8.0.60.0180.00316.80
8.0.50.0190.00316.83
8.0.30.0210.00016.69
8.0.20.0160.00416.71
8.0.10.0200.00616.80
7.4.330.0050.00015.55
7.4.320.0000.00716.50
7.4.300.0050.00216.48
7.4.290.0050.00316.47
7.4.280.0000.00716.39
7.4.270.0210.00316.48
7.4.260.0230.00316.37
7.4.250.0320.00016.43
7.4.240.0190.00616.50
7.4.230.0230.00016.55
7.4.220.0160.00416.45
7.4.210.0150.00416.38
7.4.200.0130.00816.52
7.4.190.0150.00616.49
7.4.180.0150.00516.36
7.4.160.0160.00416.61
7.4.150.0200.00016.32
7.4.140.0100.01016.39
7.4.130.0170.00216.26
7.4.120.0150.00516.33
7.4.110.0180.00316.56
7.4.100.0190.00016.34
7.4.90.0130.00716.41
7.4.80.0100.01016.45
7.4.70.0160.00316.39
7.4.60.0150.00516.39
7.4.50.0160.00316.32
7.4.40.0100.01016.19
7.4.30.0170.00316.25
7.4.20.0160.00316.40
7.4.10.0180.00016.45
7.4.00.0140.00516.39

preferences:
26.58 ms | 403 KiB | 5 Q