3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( casa => 'string1', casa => 'string2', 4 => 'string3', 5 => 'string4'); $arrays =$array; print_r($array); $array=array(); $i=0; foreach($arrays as $k => $item) { $array[$i]=$item; unset($arrays[$k]); $i++; } print_r($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.60.0000.01516.88
8.3.50.0070.00718.18
8.3.40.0050.01018.63
8.3.30.0110.00418.48
8.3.20.0070.00020.13
8.3.10.0070.00321.95
8.3.00.0000.00823.64
8.2.180.0040.01116.75
8.2.170.0070.00722.96
8.2.160.0110.00322.12
8.2.150.0030.00624.18
8.2.140.0000.00824.66
8.2.130.0060.00320.64
8.2.120.0070.00026.35
8.2.110.0100.00022.05
8.2.100.0120.00017.91
8.2.90.0040.00419.09
8.2.80.0040.00417.97
8.2.70.0030.00617.59
8.2.60.0040.00417.93
8.2.50.0000.00818.09
8.2.40.0040.00422.19
8.2.30.0040.00419.54
8.2.20.0000.00817.80
8.2.10.0040.00417.97
8.2.00.0080.00018.05
8.1.280.0000.01425.92
8.1.270.0040.00422.08
8.1.260.0080.00028.09
8.1.250.0050.00228.09
8.1.240.0030.00623.91
8.1.230.0030.00720.95
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0000.00817.23
8.1.180.0060.00318.10
8.1.170.0000.00818.50
8.1.160.0040.00420.61
8.1.150.0040.00418.80
8.1.140.0040.00419.49
8.1.130.0040.00417.63
8.1.120.0090.00017.29
8.1.110.0040.00417.27
8.1.100.0070.00017.37
8.1.90.0040.00417.33
8.1.80.0050.00217.38
8.1.70.0030.00317.29
8.1.60.0000.00817.39
8.1.50.0040.00417.33
8.1.40.0040.00417.41
8.1.30.0050.00317.58
8.1.20.0040.00417.49
8.1.10.0050.00317.48
8.1.00.0050.00217.46
8.0.300.0040.00418.84
8.0.290.0070.00016.75
8.0.280.0000.00718.30
8.0.270.0000.00717.27
8.0.260.0030.00317.16
8.0.250.0040.00416.97
8.0.240.0070.00017.03
8.0.230.0070.00016.86
8.0.220.0030.00616.92
8.0.210.0040.00416.77
8.0.200.0000.00716.92
8.0.190.0030.00617.02
8.0.180.0040.00416.91
8.0.170.0040.00416.83
8.0.160.0030.00616.89
8.0.150.0070.00016.93
8.0.140.0070.00016.91
8.0.130.0060.00013.37
8.0.120.0030.00616.88
8.0.110.0070.00016.93
8.0.100.0040.00416.79
8.0.90.0030.00516.99
8.0.80.0000.01916.97
8.0.70.0040.00416.93
8.0.60.0040.00416.89
8.0.50.0070.00016.98
8.0.30.0050.01417.16
8.0.20.0100.00817.40
8.0.10.0040.00416.80
8.0.00.0110.00816.76
7.4.330.0000.00516.74
7.4.320.0030.00316.62
7.4.300.0000.00616.54
7.4.290.0000.00716.42
7.4.280.0030.00616.59
7.4.270.0000.00716.64
7.4.260.0060.00316.61
7.4.250.0000.00716.53
7.4.240.0000.00716.55
7.4.230.0050.00216.66
7.4.220.0100.01716.62
7.4.210.0080.00716.48
7.4.200.0070.00016.65
7.4.160.0060.00916.31
7.4.150.0120.00617.40
7.4.140.0070.01617.86
7.4.130.0130.00616.57
7.4.120.0090.00916.63
7.4.110.0100.00716.40
7.4.100.0140.00316.49
7.4.90.0030.01416.53
7.4.80.0090.00919.39
7.4.70.0130.00316.48
7.4.60.0060.01416.39
7.4.50.0100.00316.44
7.4.40.0080.00816.47
7.4.30.0090.00916.51
7.4.00.0050.01215.11
7.3.330.0020.00513.28
7.3.320.0050.00013.18
7.3.310.0030.00316.31
7.3.300.0030.00316.38
7.3.290.0030.00316.29
7.3.280.0060.01116.39
7.3.270.0160.00017.40
7.3.260.0100.00716.38
7.3.250.0100.01016.54
7.3.240.0080.01216.59
7.3.230.0140.00416.51
7.3.210.0130.00316.61
7.3.200.0070.01019.39
7.3.190.0060.01016.64
7.3.180.0100.01016.48
7.3.170.0130.00316.33
7.3.160.0060.00916.43
7.3.120.0110.00314.73
7.3.110.0050.01114.97
7.3.100.0100.00314.72
7.3.90.0010.01314.77
7.3.80.0030.00914.97
7.3.70.0090.00514.84
7.3.60.0070.00814.83
7.3.50.0030.00714.85
7.3.40.0060.00614.85
7.3.30.0040.00914.83
7.3.20.0050.00716.70
7.3.10.0070.01016.75
7.3.00.0030.00916.61
7.2.330.0030.01416.55
7.2.320.0090.01416.74
7.2.310.0070.01416.64
7.2.300.0040.01816.34
7.2.290.0030.01316.69
7.2.250.0100.00714.97
7.2.240.0080.01015.07
7.2.230.0050.00814.92
7.2.220.0050.00814.75
7.2.210.0070.00915.03
7.2.200.0070.00815.21
7.2.190.0080.00914.97
7.2.180.0030.01415.00
7.2.170.0070.00814.98
7.2.160.0030.01315.15
7.2.150.0040.01116.61
7.2.140.0040.01417.07
7.2.130.0030.00916.65
7.2.120.0120.00416.95
7.2.110.0000.01516.86
7.2.100.0070.00716.75
7.2.90.0070.01016.86
7.2.80.0080.00816.79
7.2.70.0000.01217.05
7.2.60.0090.00516.78
7.2.50.0040.01117.00
7.2.40.0030.01416.72
7.2.30.0060.00617.16
7.2.20.0090.00616.87
7.2.10.0040.01116.73
7.2.00.0070.00517.90
7.1.330.0050.01015.96
7.1.320.0080.00515.85
7.1.310.0060.00615.69
7.1.300.0050.01015.83
7.1.290.0050.00815.77
7.1.280.0030.00715.60
7.1.270.0080.00815.68
7.1.260.0050.01015.90
7.1.250.0000.01515.90
7.1.200.0170.01215.48
7.1.100.0040.00818.19
7.1.70.0080.00017.34
7.1.60.0090.00919.40
7.1.50.0030.00916.99
7.1.00.0030.06022.28
7.0.200.0030.00616.79
7.0.60.0130.07021.86
7.0.50.0200.07317.75
7.0.40.0030.04320.16
7.0.30.0270.04320.25
7.0.20.0200.04720.24
7.0.10.0130.08020.24
7.0.00.0070.07320.29
5.6.280.0030.05021.09
5.6.210.0030.04020.46
5.6.200.0100.08018.14
5.6.190.0030.05020.55
5.6.180.0270.07720.65
5.6.170.0270.07320.54
5.6.160.0000.09020.55
5.6.150.0070.08318.19
5.6.140.0030.04718.11
5.6.130.0070.04318.18
5.6.120.0030.08720.99
5.6.110.0070.05321.11
5.6.100.0100.08021.08
5.6.90.0000.06720.96
5.6.80.0130.05720.37
5.5.350.0100.07020.38
5.5.340.0100.04318.04
5.5.330.0000.05020.46
5.5.320.0200.05320.35
5.5.310.0270.06720.34
5.5.300.0100.08017.95
5.5.290.0070.04017.95
5.5.280.0070.06020.87
5.5.270.0030.04320.88
5.5.260.0100.08020.89
5.5.250.0170.07320.58
5.5.240.0170.07720.13

preferences:
45.1 ms | 400 KiB | 5 Q