3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['Dog:110', 'Cat:111', 'Mouse:101']; $result = []; foreach ($array as $v) { $temp = explode(':', $v, 2); $result[$temp[0]] = (int)$temp[1]; } var_export($result);

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.5.30.0120.00918.12
8.5.20.0060.00220.27
8.5.10.0060.00416.69
8.5.00.0130.00919.98
8.4.180.0090.01219.71
8.4.170.0120.01020.57
8.4.160.0130.01020.52
8.4.150.0070.00516.87
8.4.140.0110.00917.34
8.4.130.0120.00817.68
8.4.120.0060.00220.51
8.4.110.0090.01118.72
8.4.100.0140.00617.90
8.4.90.0160.00617.64
8.4.80.0030.00517.75
8.4.70.0110.01017.70
8.4.60.0080.00518.90
8.4.50.0090.00920.31
8.4.40.0100.01017.66
8.4.30.0110.00920.59
8.4.20.0160.01219.11
8.4.10.0230.01119.32
8.3.300.0110.01020.78
8.3.290.0100.01020.76
8.3.280.0110.01018.29
8.3.270.0100.00916.56
8.3.260.0030.00516.61
8.3.250.0090.00918.99
8.3.240.0080.01116.54
8.3.230.0130.00616.63
8.3.220.0130.00517.30
8.3.210.0100.00816.43
8.3.200.0040.00416.45
8.3.190.0020.00517.10
8.3.180.0110.00718.83
8.3.170.0140.00417.25
8.3.160.0100.00018.39
8.3.150.0170.00416.56
8.3.140.0180.00316.62
8.3.130.0160.00316.41
8.3.120.0160.00316.57
8.3.110.0170.00316.44
8.3.100.0160.00416.66
8.3.90.0220.00016.47
8.3.80.0130.00716.72
8.3.70.0190.00318.32
8.3.60.0220.00016.56
8.3.50.0150.00718.14
8.3.40.0130.00917.39
8.3.30.0170.00017.13
8.3.20.0140.00217.35
8.3.10.0120.00419.41
8.3.00.0030.00619.21
8.2.300.0050.00520.42
8.2.290.0100.00820.55
8.2.280.0080.00718.42
8.2.270.0170.00016.77
8.2.260.0120.00616.24
8.2.250.0130.00316.49
8.2.240.0130.00516.71
8.2.230.0150.00416.45
8.2.220.0170.00316.32
8.2.210.0170.00016.73
8.2.200.0170.00016.52
8.2.190.0180.00018.36
8.2.180.0120.00616.30
8.2.170.0170.00317.43
8.2.160.0110.00717.60
8.2.150.0110.00817.60
8.2.140.0150.00417.56
8.2.130.0130.00417.54
8.2.120.0130.00617.18
8.2.110.0130.01119.25
8.2.100.0160.00017.29
8.2.90.0110.00617.59
8.2.80.0040.01317.37
8.2.70.0140.00517.37
8.2.60.0230.00319.25
8.2.50.0160.01019.05
8.2.40.0240.00017.43
8.2.30.0120.00417.40
8.2.20.0120.00417.43
8.2.10.0170.00017.43
8.2.00.0130.00317.50
8.1.340.0120.00919.82
8.1.320.0140.00516.04

preferences:
42.03 ms | 848 KiB | 5 Q