3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mapping = [ "AccountId" => "account_id", "Id" => "master_id", "Name" => "name" ]; $input = [ "AccountId" => "18", "Id" => "53600065", "Name" => "Awesome Test Company From SS", "Financial" => [ "vat" => "12345", ] ]; $output = [ "account_id" => "18", "master_id" => "53600065", "name" => "Awesome Test Company From SS" ]; foreach ($mapping as $from => $to) { if (array_key_exists($from, $input)) { $output[$to] = $input[$from]; } }

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.0090.00918.30
8.3.50.0070.00716.29
8.3.40.0110.00418.84
8.3.30.0110.00418.52
8.3.20.0000.00820.25
8.3.10.0070.00021.90
8.3.00.0040.00420.84
8.2.180.0070.00718.29
8.2.170.0110.00722.96
8.2.160.0110.00721.98
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00022.11
8.2.120.0040.00426.35
8.2.110.0060.00320.41
8.2.100.0060.00617.59
8.2.90.0000.00819.33
8.2.80.0040.00418.05
8.2.70.0000.00817.46
8.2.60.0000.00917.79
8.2.50.0050.00318.10
8.2.40.0040.00420.54
8.2.30.0000.00721.13
8.2.20.0000.00718.18
8.2.10.0000.00718.11
8.2.00.0040.00418.14
8.1.280.0200.00725.92
8.1.270.0030.00621.88
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00322.17
8.1.230.0140.00019.02
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0040.00817.35
8.1.190.0030.00617.22
8.1.180.0050.00318.10
8.1.170.0040.00418.61
8.1.160.0000.00719.00
8.1.150.0040.00420.68
8.1.140.0050.00219.62
8.1.130.0030.00318.79
8.1.120.0030.00617.48
8.1.110.0040.00417.48
8.1.100.0050.00317.50
8.1.90.0070.00017.49
8.1.80.0000.00717.35
8.1.70.0000.00717.34
8.1.60.0000.00817.55
8.1.50.0040.00417.52
8.1.40.0030.00517.50
8.1.30.0040.00417.54
8.1.20.0040.00417.70
8.1.10.0050.00317.52
8.1.00.0040.00417.45
8.0.300.0050.00318.77
8.0.290.0030.00516.75
8.0.280.0030.00318.44
8.0.270.0030.00317.22
8.0.260.0030.00316.84
8.0.250.0000.00616.91
8.0.240.0040.00416.85
8.0.230.0060.00316.84
8.0.220.0000.00716.89
8.0.210.0000.00716.89
8.0.200.0030.00316.94
8.0.190.0050.00316.98
8.0.180.0000.00916.89
8.0.170.0000.00716.79
8.0.160.0030.00616.89
8.0.150.0050.00216.82
8.0.140.0000.00716.78
8.0.130.0070.00013.30
8.0.120.0040.00416.79
8.0.110.0000.00716.91
8.0.100.0070.00016.68
8.0.90.0000.00816.84
8.0.80.0060.00916.91
8.0.70.0080.00016.75
8.0.60.0000.00716.80
8.0.50.0020.00516.90
8.0.30.0080.01117.24
8.0.20.0150.01817.40
8.0.10.0040.00416.91
8.0.00.0120.01216.62
7.4.330.0050.00015.55
7.4.320.0000.00616.55
7.4.300.0030.00316.57
7.4.290.0030.00616.58
7.4.280.0000.00716.48
7.4.270.0030.00316.51
7.4.260.0000.00716.59
7.4.250.0030.00516.48
7.4.240.0070.00016.51
7.4.230.0000.00816.59
7.4.220.0130.01416.60
7.4.210.0000.01816.45
7.4.200.0000.00716.57
7.4.160.0100.00716.58
7.4.150.0140.00417.40
7.4.140.0070.01117.86
7.4.130.0150.00316.39
7.4.120.0110.00716.64
7.4.110.0090.01316.34
7.4.100.0070.01016.58
7.4.90.0100.01016.41
7.4.80.0110.00619.39
7.4.70.0080.00816.34
7.4.60.0090.00616.65
7.4.50.0000.01616.50
7.4.40.0040.01216.60
7.4.30.0130.00316.49
7.4.00.0120.00314.89
7.3.330.0000.00813.05
7.3.320.0000.00613.07
7.3.310.0000.00616.28
7.3.300.0070.00016.34
7.3.290.0090.00716.31
7.3.280.0080.00816.30
7.3.270.0060.00917.40
7.3.260.0080.01016.27
7.3.250.0120.00616.35
7.3.240.0050.01116.38
7.3.230.0080.01116.38
7.3.210.0120.01516.34
7.3.200.0100.00716.37
7.3.190.0180.00816.29
7.3.180.0160.00316.48
7.3.170.0080.00716.38
7.3.160.0090.00616.26
7.2.330.0070.01416.62
7.2.320.0130.00616.73
7.2.310.0170.00016.69
7.2.300.0100.00716.40
7.2.290.0120.00416.79
7.2.60.0070.00716.87
7.2.00.0000.01318.93
7.1.200.0080.00415.94
7.1.100.0000.01417.95
7.1.70.0110.01117.02
7.1.60.0500.02033.24
7.1.50.0530.00732.79
7.1.40.1400.01332.63
7.1.30.0530.01032.76
7.1.20.0670.00732.72
7.1.10.0330.01014.66
7.1.00.0430.00315.01
7.0.200.0500.01315.07
7.0.190.0400.01014.89
7.0.180.0430.01314.43
7.0.170.0370.01014.41
7.0.160.0330.01014.55
7.0.150.0330.01014.53
7.0.140.0330.01014.45
7.0.130.0330.00714.65
7.0.120.0430.00714.64
7.0.110.0370.00714.54
7.0.100.0400.00314.47
7.0.90.0270.01314.51
7.0.80.0270.01014.42
7.0.70.0330.00714.39
7.0.60.0400.01314.16
7.0.50.0330.00714.61
7.0.40.0330.00714.59
7.0.30.0300.01014.67
7.0.20.0470.01314.43
7.0.10.0330.01014.57
7.0.00.0430.00314.51

preferences:
42.24 ms | 401 KiB | 5 Q