3v4l.org

run code in 300+ PHP versions simultaneously
<?php // $array = ['Prinsha', 'Jypsy']; // echo $array[0]; // index is 0 // foreach($model as $key => $data) { // } // $array[1] = 'data'; // $array = ['model' => $model]; // $array = array(); // date('Y-m-d', strtotime("+3 days", $time)); $array = [1, 2, 3, 4]; echo $array[0] . "\n"; $associative = ['a' => 'one', 'apple' => '3v4l', '1337' => 'PHP sucks']; echo $associative['a'] . "\n"; echo $associative['apple'] . "\n"; echo $associative[1337] . "\n"; $numbers = [1,2,3,4]; $numbers[] = 5; echo $numbers[0] . "\n"; //1 echo $numbers[4] . "\n"; // $favColors = array(); $favColors[] = 'BlanchedAlmond'; $favColors[] = 'CadetBlue'; $favColors[] = 'BurlyWood'; $favColors[] = 'DarkOliveGreen'; $favColors[] = 'HotPink'; $favColors[] = 'Papayawhip'; echo $favColors[0];

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.0040.01116.75
8.3.50.0000.01416.61
8.3.40.0150.00618.92
8.3.30.0120.00318.87
8.3.20.0050.00320.34
8.3.10.0060.00621.95
8.3.00.0040.00421.88
8.2.180.0100.01016.38
8.2.170.0070.01122.96
8.2.160.0100.00319.00
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00019.27
8.2.120.0000.00826.35
8.2.110.0030.00619.33
8.2.100.0080.00317.84
8.2.90.0040.00419.17
8.2.80.0000.00818.04
8.2.70.0000.00817.63
8.2.60.0040.00418.00
8.2.50.0080.00018.16
8.2.40.0040.00420.48
8.2.30.0040.00419.24
8.2.20.0070.00318.08
8.2.10.0040.00417.88
8.2.00.0000.00718.02
8.1.280.0110.00725.92
8.1.270.0070.00022.18
8.1.260.0070.00026.35
8.1.250.0060.00328.09
8.1.240.0000.00822.75
8.1.230.0040.00719.16
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00617.34
8.1.190.0040.00417.23
8.1.180.0060.00318.10
8.1.170.0060.00318.68
8.1.160.0020.00519.00
8.1.150.0040.00418.97
8.1.140.0050.00319.46
8.1.130.0000.00718.89
8.1.120.0040.00417.48
8.1.110.0070.00017.46
8.1.100.0040.00417.46
8.1.90.0040.00417.36
8.1.80.0040.00417.34
8.1.70.0000.00717.36
8.1.60.0040.00417.49
8.1.50.0040.00417.54
8.1.40.0080.00017.52
8.1.30.0040.00417.65
8.1.20.0030.00517.63
8.1.10.0000.00817.52
8.1.00.0040.00417.46
8.0.300.0020.00519.82
8.0.290.0000.00816.75
8.0.280.0000.00718.52
8.0.270.0030.00317.29
8.0.260.0080.00016.88
8.0.250.0030.00316.92
8.0.240.0090.00016.89
8.0.230.0030.00417.01
8.0.220.0040.00416.80
8.0.210.0070.00016.90
8.0.200.0060.00016.90
8.0.190.0040.00416.88
8.0.180.0040.00416.97
8.0.170.0000.00716.83
8.0.160.0000.00716.93
8.0.150.0000.00716.79
8.0.140.0000.00816.90
8.0.130.0030.00313.35
8.0.120.0080.00016.74
8.0.110.0000.00717.02
8.0.100.0030.00516.92
8.0.90.0000.00716.84
8.0.80.0120.00416.90
8.0.70.0020.00516.93
8.0.60.0000.00716.73
8.0.50.0050.00216.71
8.0.30.0170.00216.88
8.0.20.0060.01217.40
8.0.10.0000.00717.04
8.0.00.0000.01616.84
7.4.330.0050.00015.55
7.4.320.0070.00016.46
7.4.300.0030.00316.57
7.4.290.0000.00816.50
7.4.280.0040.00416.49
7.4.270.0030.00316.48
7.4.260.0030.00316.44
7.4.250.0000.00816.50
7.4.240.0030.00516.41
7.4.230.0000.00716.54
7.4.220.0090.00916.48
7.4.210.0000.01316.36
7.4.200.0030.00316.56
7.4.160.0120.00716.50
7.4.150.0000.01617.40
7.4.140.0110.00817.86
7.4.130.0060.01316.48
7.4.120.0110.00716.56
7.4.110.0120.00616.43
7.4.100.0100.01016.43
7.4.90.0180.00016.60
7.4.80.0130.00319.39
7.4.70.0110.01116.50
7.4.60.0090.00616.61
7.4.50.0050.00816.50
7.4.40.0030.01316.38
7.4.30.0080.00916.66
7.4.10.0060.01314.89
7.4.00.0060.00914.84
7.3.330.0070.00013.11
7.3.320.0000.00513.12
7.3.310.0050.00316.25
7.3.300.0070.00016.27
7.3.290.0080.00816.20
7.3.280.0080.01016.24
7.3.270.0170.00017.40
7.3.260.0100.00716.47
7.3.250.0090.01016.33
7.3.240.0080.00916.21
7.3.230.0100.01316.55
7.3.210.0090.00616.33
7.3.200.0110.00816.43
7.3.190.0030.01316.68
7.3.180.0150.00616.60
7.3.170.0110.00816.29
7.3.160.0110.00716.37
7.3.130.0030.01314.75
7.3.120.0140.00314.84
7.3.110.0090.00914.76
7.3.100.0030.00714.59
7.3.90.0040.00814.97
7.3.80.0060.00614.97
7.3.70.0070.00714.50
7.3.60.0110.00015.03
7.3.50.0060.00814.84
7.3.40.0030.00614.86
7.3.30.0120.00314.66
7.3.20.0090.00916.85
7.3.10.0060.00916.40
7.3.00.0060.01016.78
7.2.330.0100.00716.55
7.2.320.0140.00316.71
7.2.310.0150.01016.65
7.2.300.0100.00716.72
7.2.290.0100.00716.34
7.2.260.0100.00714.91
7.2.250.0110.00715.17
7.2.240.0060.01015.25
7.2.230.0060.00715.15
7.2.220.0040.01114.89
7.2.210.0000.01515.21
7.2.200.0070.00315.18
7.2.190.0030.00914.75
7.2.180.0030.00614.93
7.2.170.0030.01715.15
7.2.160.0090.00915.13
7.2.150.0100.00316.97
7.2.140.0050.00516.95
7.2.130.0130.00316.96
7.2.120.0110.00016.89
7.2.110.0030.00716.62
7.2.100.0120.00316.98
7.2.90.0100.00316.80
7.2.80.0100.00716.89
7.2.70.0000.01517.13
7.2.60.0020.01216.82
7.2.50.0130.00016.86
7.2.40.0070.00716.77
7.2.30.0070.00716.87
7.2.20.0130.00317.13
7.2.10.0000.01417.03
7.2.00.0080.00618.32
7.1.330.0070.01015.90
7.1.320.0070.00315.87
7.1.310.0000.01415.61
7.1.300.0000.01215.81
7.1.290.0100.00315.74
7.1.280.0160.00015.86
7.1.270.0070.01015.47
7.1.260.0070.00315.96
7.1.250.0030.01215.77
7.1.240.0060.00615.76
7.1.230.0090.00615.75
7.1.220.0040.01215.64
7.1.210.0080.00515.88
7.1.200.0070.00515.80
7.1.190.0000.01015.65
7.1.180.0060.00615.52
7.1.170.0060.00615.81
7.1.160.0070.00715.40
7.1.150.0030.01315.84
7.1.140.0030.01115.81
7.1.130.0030.01015.66
7.1.120.0030.01015.61
7.1.110.0000.01315.89
7.1.100.0040.00916.71
7.1.90.0100.00715.89
7.1.80.0030.01215.81
7.1.70.0030.00816.64
7.1.60.0130.00825.35
7.1.50.0130.00825.24
7.1.40.0170.00325.06
7.1.30.0190.00625.00
7.1.20.0150.00625.08
7.1.10.0060.01016.07
7.1.00.0120.00316.13
7.0.330.0000.01615.15
7.0.320.0040.01115.49
7.0.310.0070.00715.38
7.0.300.0080.00315.43
7.0.290.0060.00615.55
7.0.280.0030.00615.34
7.0.270.0100.00615.37
7.0.260.0150.00015.47
7.0.250.0060.01115.53
7.0.240.0000.01215.28
7.0.230.0000.01415.64
7.0.220.0090.00315.46
7.0.210.0000.01015.29
7.0.200.0040.01116.06
7.0.190.0020.01316.03
7.0.180.0030.00915.87
7.0.170.0050.00915.83
7.0.160.0070.00615.70
7.0.150.0080.00915.89
7.0.140.0040.01215.83
7.0.130.0030.00816.08
7.0.120.0000.01416.03
7.0.110.0050.00915.56
7.0.100.0020.01015.82
7.0.90.0030.01015.79
7.0.80.0060.00916.01
7.0.70.0030.00815.81
7.0.60.0000.01415.62
7.0.50.0050.00715.93
7.0.40.0050.00915.04
7.0.30.0050.01314.73
7.0.20.0090.01014.79
7.0.10.0100.00814.78
7.0.00.0030.01114.86
5.6.400.0030.01214.73
5.6.390.0030.00614.32
5.6.380.0060.00614.70
5.6.370.0090.00014.51
5.6.360.0030.01314.40
5.6.350.0000.00914.21
5.6.340.0070.00714.81
5.6.330.0030.01014.57
5.6.320.0070.01014.53
5.6.310.0000.01514.74
5.6.300.0070.00714.64
5.6.290.0040.01114.37
5.6.280.0000.00814.22
5.6.270.0060.00614.47
5.6.260.0040.01114.71
5.6.250.0110.00414.47
5.6.240.0000.01414.28
5.6.230.0060.00314.65
5.6.220.0080.00414.28
5.6.210.0030.01014.51
5.6.200.0000.01514.61
5.6.190.0070.00314.40
5.6.180.0030.00914.22
5.6.170.0060.00314.45
5.6.160.0110.00414.58
5.6.150.0000.01714.17
5.6.140.0040.01114.25
5.6.130.0070.01014.48
5.6.120.0080.00314.50
5.6.110.0000.01314.55
5.6.100.0000.01114.34
5.6.90.0040.01214.58
5.6.80.0060.00314.46
5.6.70.0070.00714.60
5.6.60.0060.00914.23
5.6.50.0030.01314.35
5.6.40.0000.01514.44
5.6.30.0100.00714.47
5.6.20.0100.00314.20
5.6.10.0000.01214.41
5.6.00.0030.00914.31

preferences:
45.63 ms | 400 KiB | 5 Q