3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( "action: Added; amount: 1; code: RNA1; name: Mens Organic T-shirt; colour: White; size: XL", "action: Subtracted; amount: 7; code: RNC1; name: Kids Basic T-shirt; colour: Denim Blue; size: 3-4y", "action: Added; amount: 20; code: RNV1; name: Gift Voucher; style: Mens; value: £20", ); $data = []; foreach ($arr as $line) { $newItem = []; foreach (explode(';', $line) as $item) { $parts = explode(':', $item); $newItem[trim($parts[0])] = trim($parts[1]); } $data[] = $newItem; } print_r($data);

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.20.0040.00424.18
8.4.10.0130.00621.00
8.3.150.0150.00320.60
8.3.140.0060.00916.48
8.3.130.0090.00618.55
8.3.120.0100.00717.34
8.3.110.0130.01018.68
8.3.100.0050.00516.79
8.3.90.0040.00426.77
8.3.80.0030.00616.63
8.3.70.0150.00016.63
8.3.60.0070.00716.63
8.3.50.0130.00723.59
8.3.40.0110.00420.97
8.3.30.0170.00018.85
8.3.20.0080.00024.18
8.3.10.0050.00324.66
8.3.00.0030.00726.16
8.2.260.0050.00318.47
8.2.250.0090.00018.22
8.2.240.0060.00319.09
8.2.230.0050.00322.58
8.2.220.0000.00824.06
8.2.210.0040.00426.77
8.2.200.0050.00518.16
8.2.190.0140.00016.63
8.2.180.0110.00425.92
8.2.170.0090.00618.96
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0070.00020.93
8.2.110.0100.00721.17
8.2.100.0120.00017.97
8.2.90.0060.00317.91
8.2.80.0000.00917.97
8.2.70.0000.00818.05
8.2.60.0050.00318.09
8.2.50.0080.00018.10
8.2.40.0050.00219.48
8.2.30.0000.00719.31
8.2.20.0080.00018.23
8.2.10.0000.00719.18
8.2.00.0040.00419.27
8.1.310.0070.00018.49
8.1.300.0000.00916.37
8.1.290.0050.00530.84
8.1.280.0150.00425.92
8.1.270.0060.00323.99
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0140.01022.54
8.1.230.0070.00420.90
8.1.220.0080.00017.80
8.1.210.0030.00518.91
8.1.200.0060.00317.48
8.1.190.0040.00417.35
8.1.180.0030.00618.10
8.1.170.0040.00418.62
8.1.160.0000.01019.07
8.1.150.0040.00419.00
8.1.140.0040.00418.77
8.1.130.0030.00320.05
8.1.120.0030.00617.53
8.1.110.0000.00817.36
8.1.100.0040.00417.29
8.1.90.0050.00317.37
8.1.80.0030.00617.34
8.1.70.0060.00317.38
8.1.60.0080.00017.60
8.1.50.0040.00417.53
8.1.40.0000.00817.53
8.1.30.0060.00317.66
8.1.20.0000.00717.58
8.1.10.0040.00417.42
8.1.00.0060.00617.44
8.0.300.0000.00720.06
8.0.290.0030.00616.75
8.0.280.0070.00018.45
8.0.270.0000.00816.73
8.0.260.0030.00318.51
8.0.250.0000.00816.97
8.0.240.0030.00716.95
8.0.230.0030.00316.97
8.0.220.0030.00316.91
8.0.210.0040.00416.97
8.0.200.0060.00016.96
8.0.190.0040.00416.88
8.0.180.0040.00416.81
8.0.170.0100.00016.96
8.0.160.0060.00316.93
8.0.150.0040.00316.87
8.0.140.0070.00016.86
8.0.130.0030.00313.32
8.0.120.0040.00416.87
8.0.110.0040.00416.72
8.0.100.0040.00416.80
8.0.90.0030.00316.99
8.0.80.0050.01416.88
8.0.70.0050.00316.85
8.0.60.0050.00216.85
8.0.50.0040.00416.88
8.0.30.0100.01017.02
8.0.20.0110.00816.89
8.0.10.0090.01016.93
8.0.00.0110.00916.94
7.4.330.0000.00615.55
7.4.320.0030.00616.41
7.4.300.0000.00616.66
7.4.290.0000.00816.61
7.4.280.0040.00416.40
7.4.270.0040.00416.41
7.4.260.0000.00513.32
7.4.250.0070.00016.50
7.4.240.0030.00316.46
7.4.230.0030.00316.64
7.4.220.0020.00516.62
7.4.210.0050.01216.54
7.4.200.0030.00516.54
7.4.160.0110.00816.55
7.4.150.0080.01016.43
7.4.140.0060.01316.44
7.4.130.0070.01016.41
7.4.120.0100.00916.47
7.4.110.0090.00816.51
7.4.100.0090.00816.40
7.4.90.0040.01216.43
7.4.80.0090.00916.48
7.4.70.0080.00816.41
7.4.60.0090.00916.44
7.4.50.0110.00916.37
7.4.40.0110.00716.37
7.4.30.0100.00816.48
7.4.20.0110.00816.41
7.4.10.0070.00916.38
7.4.00.0100.00916.39
7.3.330.0000.00716.39
7.3.320.0000.00713.04
7.3.310.0030.00316.16
7.3.300.0040.00416.19
7.3.290.0090.00816.31
7.3.280.0080.00816.33
7.3.270.0110.00916.27
7.3.260.0070.01016.39
7.3.250.0120.00516.27
7.3.240.0050.01316.30
7.3.230.0060.01216.30
7.3.220.0090.00716.46
7.3.210.0090.00916.38
7.3.200.0090.00716.30
7.3.190.0080.00916.30
7.3.180.0100.00816.36
7.3.170.0080.01116.26
7.3.160.0110.00616.32
7.3.150.0080.00816.36
7.3.140.0080.00716.27
7.3.130.0060.01216.34
7.3.120.0080.00916.40
7.3.110.0090.00916.33
7.3.100.0100.00816.30
7.3.90.0080.00916.45
7.3.80.0110.00716.33
7.3.70.0080.00716.49
7.3.60.0110.00816.42
7.3.50.0100.00816.45
7.3.40.0070.01016.37
7.3.30.0110.00716.38
7.3.20.0090.00816.40
7.3.10.0100.00816.45
7.3.00.0140.00716.44
7.2.340.0200.00616.50
7.2.330.0150.00816.53
7.2.320.0170.01016.47
7.2.310.0170.01016.47
7.2.300.0140.00816.41
7.2.290.0140.00816.42
7.2.280.0160.00716.46
7.2.270.0130.01016.52
7.2.260.0170.00816.48
7.2.250.0140.01116.49
7.2.240.0180.01016.46
7.2.230.0210.00516.51
7.2.220.0130.01016.46
7.2.210.0120.01216.45
7.2.200.0130.01216.67
7.2.190.0140.01016.48
7.2.180.0150.00916.60
7.2.170.0160.00916.60
7.2.160.0120.01116.54
7.2.150.0130.01116.67
7.2.140.0210.00416.68
7.2.130.0180.00716.70
7.2.120.0120.01316.69
7.2.110.0230.01117.12
7.2.100.0150.00916.63
7.2.90.0180.00716.61
7.2.80.0250.00916.66
7.2.70.0170.00717.11
7.2.60.0180.01117.07
7.2.50.0180.01017.08
7.2.40.0170.01017.14
7.2.30.0150.01117.16
7.2.20.0170.00917.04
7.2.10.0170.01017.13
7.2.00.0180.00917.11
7.1.330.0230.00415.62
7.1.320.0080.02015.66
7.1.310.0170.01215.59
7.1.300.0280.00415.56
7.1.290.0140.01015.46
7.1.280.0190.01115.55
7.1.270.0210.00715.50
7.1.260.0150.01115.45
7.1.250.0170.01115.36
7.1.240.0230.00515.52
7.1.230.0270.00915.56
7.1.220.0220.00615.57
7.1.210.0210.01515.43
7.1.200.0170.00715.49
7.1.190.0180.00917.29
7.1.180.0180.01317.29
7.1.170.0220.00917.29
7.1.160.0200.00617.34
7.1.150.0090.01817.28
7.1.140.0240.00617.28
7.1.130.0230.00617.28
7.1.120.0200.00917.34
7.1.110.0210.00517.40
7.1.100.0150.01117.38
7.1.90.0190.01015.52
7.1.80.0250.01915.62
7.1.70.0150.01515.31
7.1.60.0220.00815.49
7.1.50.1040.01415.57
7.1.40.0620.00315.56
7.1.30.0160.00815.54
7.1.20.0190.00915.59
7.1.10.0220.00615.52
7.1.00.0310.00015.50
7.0.330.0170.00815.20
7.0.320.0240.01415.08
7.0.310.0220.00617.03
7.0.300.0190.01116.96
7.0.290.0210.00616.95
7.0.280.0180.00816.98
7.0.270.0200.00717.00
7.0.260.0220.00616.85
7.0.250.0190.00817.12
7.0.240.0110.01217.22
7.0.230.0190.00715.44
7.0.220.0220.00615.33
7.0.210.0220.00715.22
7.0.200.0170.01415.22
7.0.190.0120.01515.25
7.0.180.0260.00515.16
7.0.170.0220.00715.38
7.0.160.0170.00915.15
7.0.150.0160.01315.27
7.0.140.0170.00915.29
7.0.130.0180.00915.29
7.0.120.0190.00715.30
7.0.110.0250.00015.25
7.0.100.0000.02315.22
7.0.90.0210.01015.16
7.0.80.0170.00715.12
7.0.70.0170.01315.11
7.0.60.0140.01415.19
7.0.50.0410.02015.07
7.0.40.0380.00515.21
7.0.30.0840.00015.22
7.0.20.0180.00515.26
7.0.10.0250.00315.23
7.0.00.0150.01115.09
5.6.400.0120.01915.79
5.6.390.0170.01715.79
5.6.380.0190.01115.78
5.6.370.0160.01315.80
5.6.360.0190.00815.70
5.6.350.0180.00515.75
5.6.340.0200.00815.73
5.6.330.0140.01415.79
5.6.320.0200.00615.86
5.6.310.0170.01015.94
5.6.300.0230.00415.70
5.6.290.0230.00615.82
5.6.280.0200.00715.82
5.6.270.0190.00515.70
5.6.260.0230.00415.80
5.6.250.0150.01615.98
5.6.240.0190.01515.99
5.6.230.0170.01016.05
5.6.220.0120.01816.02
5.6.210.0160.01416.02
5.6.200.0210.00616.03
5.6.190.0280.00516.19
5.6.180.0210.00516.00
5.6.170.0160.01316.14
5.6.160.0250.00316.14
5.6.150.0130.01316.04
5.6.140.0230.00716.05
5.6.130.0280.00315.94
5.6.120.0230.00316.05
5.6.110.0200.01216.04
5.6.100.0430.00316.18
5.6.90.0140.01516.05
5.6.80.0160.01015.96
5.6.70.0130.01016.04
5.6.60.0180.01416.11
5.6.50.0140.01015.83
5.6.40.0120.01216.05
5.6.30.0240.00316.05
5.6.20.0120.01215.86
5.6.10.0120.01315.88
5.6.00.0290.00715.86
5.5.380.0240.00616.04
5.5.370.0240.00816.21
5.5.360.0260.00915.89
5.5.350.0240.00015.74
5.5.340.0090.01815.76
5.5.330.0200.01215.83
5.5.320.0220.00315.82
5.5.310.0130.01315.92
5.5.300.0150.01515.73
5.5.290.0230.00515.73
5.5.280.0220.00315.78
5.5.270.0230.00815.85
5.5.260.0200.00915.98
5.5.250.0180.01116.05
5.5.240.0120.01215.91
5.5.230.0090.01915.93
5.5.220.0240.01115.88
5.5.210.0110.01216.07
5.5.200.0190.00615.72
5.5.190.0080.01615.70
5.5.180.0180.00515.72
5.5.170.0220.00215.72
5.5.160.0170.01015.71
5.5.150.0080.01715.71
5.5.140.0210.00615.59
5.5.130.0160.00715.84
5.5.120.0120.01215.62
5.5.110.0230.00815.80
5.5.100.0130.01015.84
5.5.90.0250.00415.92
5.5.80.0220.00915.92
5.5.70.0270.01215.80
5.5.60.0170.01015.84
5.5.50.0140.01215.75
5.5.40.0180.00415.91
5.5.30.0170.00616.03
5.5.20.0180.00915.83
5.5.10.0190.01215.78
5.5.00.0210.01115.73
5.4.450.0100.01112.74
5.4.440.0190.00312.93
5.4.430.0190.00512.81
5.4.420.0120.00912.78
5.4.410.0190.00612.91
5.4.400.0140.00712.73
5.4.390.0050.01512.79
5.4.380.0140.00612.75
5.4.370.0180.00312.75
5.4.360.0130.01012.70
5.4.350.0110.00612.78
5.4.340.0180.00712.76
5.4.330.0100.01012.71
5.4.320.0090.00912.92
5.4.310.0170.00312.78
5.4.300.0120.00612.84
5.4.290.0090.00812.78
5.4.280.0190.00312.82
5.4.270.0130.00912.79
5.4.260.0100.00712.77
5.4.250.0130.00612.75
5.4.240.0110.00812.72
5.4.230.0120.00612.68
5.4.220.0110.01112.57
5.4.210.0120.00612.59
5.4.200.0120.00912.54
5.4.190.0150.00312.50
5.4.180.0140.01012.49
5.4.170.0180.00012.70
5.4.160.0090.01412.63
5.4.150.0200.00412.65
5.4.140.0640.00712.77
5.4.130.0070.01012.76
5.4.120.0140.00612.79
5.4.110.0100.00712.88
5.4.100.0150.00312.87
5.4.90.0120.00812.89
5.4.80.0090.00912.93
5.4.70.0150.00312.98
5.4.60.0100.01012.84
5.4.50.0140.00612.75
5.4.40.0110.01112.98
5.4.30.0130.00612.95
5.4.20.0140.00912.95
5.4.10.0120.00912.95
5.4.00.0090.00912.63
5.3.290.0110.00712.84
5.3.280.0140.00612.61
5.3.270.0070.01412.69
5.3.260.0150.00912.69
5.3.250.0160.00812.92
5.3.240.0140.00512.64
5.3.230.0170.00312.63
5.3.220.0120.00612.59
5.3.210.0130.00412.66
5.3.200.0120.00812.71
5.3.190.0110.00712.65
5.3.180.0130.00612.97
5.3.170.0120.00612.83
5.3.160.0120.01212.91
5.3.150.0140.00312.82
5.3.140.0100.01012.71
5.3.130.0110.01112.74
5.3.120.0080.01212.72
5.3.110.0160.00312.82
5.3.100.0140.00412.77
5.3.90.0080.01212.75
5.3.80.0100.00712.77
5.3.70.0170.00312.63
5.3.60.0090.01212.73
5.3.50.0040.01312.61
5.3.40.0120.00912.89
5.3.30.0090.00912.62
5.3.20.0100.00712.59
5.3.10.0140.00312.68
5.3.00.0140.00512.46
5.2.170.0000.01511.76
5.2.160.0070.01111.82
5.2.150.0110.00411.98
5.2.140.0140.00011.77
5.2.130.0070.01011.70
5.2.120.0090.00511.79
5.2.110.0080.00811.78
5.2.100.0050.01111.67
5.2.90.0100.00511.71
5.2.80.0090.00611.73
5.2.70.0110.00411.65
5.2.60.0060.01011.53
5.2.50.0100.01011.69
5.2.40.0090.00611.68
5.2.30.0070.00711.62
5.2.20.0090.00611.53
5.2.10.0070.00711.58
5.2.00.0070.00711.53
5.1.60.0050.00711.53
5.1.50.0100.00311.53
5.1.40.0100.00311.53
5.1.30.0100.00311.53
5.1.20.0080.00411.53
5.1.10.0090.00311.53
5.1.00.0040.00811.53
5.0.50.0040.00711.53
5.0.40.0050.00511.53
5.0.30.0070.00411.53
5.0.20.0060.00611.53
5.0.10.0060.00611.53
5.0.00.0070.00411.53
4.4.90.0000.00711.53
4.4.80.0080.00011.53
4.4.70.0000.00711.53
4.4.60.0000.00611.53
4.4.50.0070.00011.53
4.4.40.0000.00711.53
4.4.30.0040.00411.53
4.4.20.0000.00711.53
4.4.10.0030.00311.53
4.4.00.0030.00311.53
4.3.110.0020.00411.53
4.3.100.0070.00011.53
4.3.90.0030.00611.53
4.3.80.0070.00011.53
4.3.70.0070.00011.53
4.3.60.0040.00411.53
4.3.50.0000.00711.53
4.3.40.0070.00011.53
4.3.30.0040.00411.53
4.3.20.0060.00311.53
4.3.10.0040.00211.53
4.3.00.0000.00611.53

preferences:
70.04 ms | 403 KiB | 5 Q