3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar = []; $i = 0; while($i < 2){ $ar['fluits'][$i][] = [ 'name' => 'apple', 'color' => 'red' ]; $ar['fluits'][$i][] = [ 'name' => 'kiwi', 'color' => 'green' ]; $ar['drinks'][$i][] = [ 'name' => 'coffee', 'taste' => 'bitter' ]; // これだと「apple」の配列には「2」が追加されるが、kiwiの配列に「2」が追加されない。 $add = 'on'; if( $add == 'on' ){ $ar['drinks'][$i][0]['id'] = '1'; $ar['fluits'][$i][0]['id'] = '2'; } $i++; } var_dump($ar);

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.0110.00418.68
8.3.50.0140.00516.59
8.3.40.0060.00918.97
8.3.30.0110.00418.67
8.3.20.0000.00820.73
8.3.10.0090.00020.16
8.3.00.0080.00023.51
8.2.180.0090.00925.92
8.2.170.0090.00622.96
8.2.160.0100.00320.33
8.2.150.0050.00325.66
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0030.00619.83
8.2.110.0110.00022.18
8.2.100.0030.01017.84
8.2.90.0040.00422.18
8.2.80.0000.00817.97
8.2.70.0050.00317.80
8.2.60.0040.00418.03
8.2.50.0040.00418.10
8.2.40.0080.00019.48
8.2.30.0050.00319.37
8.2.20.0080.00018.18
8.2.10.0000.00818.76
8.2.00.0050.00319.43
8.1.280.0060.00925.92
8.1.270.0000.00922.54
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0080.00322.46
8.1.230.0080.00420.97
8.1.220.0000.00817.74
8.1.210.0030.00618.82
8.1.200.0030.00617.25
8.1.190.0040.00417.13
8.1.180.0000.00918.10
8.1.170.0090.00018.70
8.1.160.0040.00418.94
8.1.150.0000.00718.81
8.1.140.0000.00718.82
8.1.130.0070.00320.07
8.1.120.0070.00017.39
8.1.110.0040.00417.36
8.1.100.0080.00017.47
8.1.90.0000.00817.49
8.1.80.0030.00517.29
8.1.70.0030.00317.54
8.1.60.0050.00217.59
8.1.50.0090.00017.56
8.1.40.0030.00617.51
8.1.30.0000.00817.54
8.1.20.0050.00317.66
8.1.10.0000.00817.41
8.1.00.0070.00017.35
8.0.300.0040.00419.91
8.0.290.0040.00416.75
8.0.280.0040.00318.38
8.0.270.0070.00017.27
8.0.260.0000.00618.39
8.0.250.0040.00416.91
8.0.240.0030.00316.93
8.0.230.0040.00316.80
8.0.220.0030.00316.88
8.0.210.0000.00816.91
8.0.200.0040.00416.79
8.0.190.0050.00316.87
8.0.180.0040.00416.84
8.0.170.0080.00016.68
8.0.160.0030.00516.86
8.0.150.0040.00316.86
8.0.140.0050.00216.69
8.0.130.0030.00313.31
8.0.120.0040.00416.84
8.0.110.0040.00416.63
8.0.100.0030.00516.79
8.0.90.0000.00716.95
8.0.80.0090.00616.80
8.0.70.0000.00716.95
8.0.60.0050.00316.97
8.0.50.0030.00616.91
8.0.30.0100.01016.90
8.0.20.0180.00317.30
8.0.10.0050.00216.96
8.0.00.0110.00816.77
7.4.330.0050.00015.55
7.4.320.0030.00616.50
7.4.300.0000.00616.66
7.4.290.0040.00416.62
7.4.280.0030.00516.53
7.4.270.0030.00316.46
7.4.260.0070.00016.57
7.4.250.0050.00316.58
7.4.240.0020.00616.45
7.4.230.0040.00416.36
7.4.220.0000.00816.41
7.4.210.0090.00816.55
7.4.200.0000.00816.73
7.4.160.0090.00916.51
7.4.140.0110.00717.86
7.4.130.0070.01416.60
7.4.120.0120.00916.53
7.4.110.0130.01016.53
7.4.100.0150.00416.41
7.4.90.0070.01116.44
7.4.80.0130.00319.39
7.4.70.0170.00316.42
7.4.60.0000.01716.54
7.4.50.0000.01516.36
7.4.40.0060.01016.36
7.4.10.0160.00315.04
7.4.00.0050.01314.92
7.3.330.0060.00013.17
7.3.320.0000.00613.08
7.3.310.0000.00716.27
7.3.300.0030.00316.32
7.3.290.0000.00816.21
7.3.280.0180.00316.33
7.3.260.0110.00916.48
7.3.240.0070.01116.41
7.3.230.0130.01416.55
7.3.210.0030.01416.43
7.3.200.0070.01416.57
7.3.190.0070.01116.39
7.3.180.0100.00616.34
7.3.170.0100.00716.46
7.3.160.0030.01416.21
7.3.130.0030.01714.74
7.3.120.0080.01115.07
7.3.110.0100.01014.84
7.3.100.0090.00314.90
7.3.90.0110.00815.18
7.3.80.0030.00615.09
7.3.70.0090.00014.82
7.3.60.0030.00815.00
7.3.50.0070.00714.74
7.3.40.0070.00614.83
7.3.30.0060.00614.64
7.3.20.0090.01015.82
7.3.10.0090.00815.82
7.3.00.0070.01015.70
7.2.330.0070.01316.81
7.2.320.0060.01216.70
7.2.310.0070.01316.69
7.2.300.0070.02116.69
7.2.290.0070.01416.70
7.2.260.0060.01514.93
7.2.250.0070.00714.97
7.2.240.0070.01015.19
7.2.230.0070.00715.24
7.2.220.0000.01014.82
7.2.210.0030.00615.27
7.2.200.0030.01014.86
7.2.190.0060.00614.77
7.2.180.0080.01014.97
7.2.170.0070.00515.00
7.2.160.0080.00615.02
7.2.150.0100.00515.83
7.2.140.0060.01115.96
7.2.130.0030.01515.86
7.2.120.0100.00616.02
7.2.110.0050.01115.94
7.2.100.0050.01015.82
7.2.90.0090.00716.03
7.2.80.0050.00915.90
7.2.70.0210.00816.11
7.2.60.0130.00716.04
7.2.50.0100.01215.74
7.2.40.0090.00715.92
7.2.30.0110.00716.17
7.2.20.0070.00715.89
7.2.10.0060.01115.93
7.2.00.0070.00915.99
7.1.330.0070.00715.79
7.1.320.0080.00415.86
7.1.310.0000.01315.90
7.1.300.0100.00315.81
7.1.290.0070.00715.84
7.1.280.0090.00914.78
7.1.270.0070.00915.05
7.1.260.0120.00514.94
7.1.250.0030.01114.83
7.1.240.0000.01315.78
7.1.230.0090.00615.84
7.1.220.0070.00715.95
7.1.210.0000.01115.70
7.1.200.0070.00715.88
7.1.190.0090.00615.84
7.1.180.0000.00915.54
7.1.170.0100.00315.87
7.1.160.0060.00315.55
7.1.150.0060.00615.89
7.1.140.0040.00815.78
7.1.130.0000.01315.81
7.1.120.0060.00915.70
7.1.110.0150.00315.64
7.1.100.0030.01215.96
7.1.90.0000.01415.58
7.1.80.0030.00615.75
7.1.70.0060.00315.86
7.1.60.0030.00715.85
7.1.50.0100.00715.89
7.1.40.0000.01615.54
7.1.30.0080.00815.85
7.1.20.0030.01116.01
7.1.10.0030.00915.86
7.1.00.0090.00615.59

preferences:
61.2 ms | 401 KiB | 5 Q