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; $numbers[] = 6; echo $numbers[0] . "\n"; //1 echo $numbers[4] . "\n"; // echo $numbers[5] . "\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.0060.01216.75
8.3.50.0150.00416.71
8.3.40.0130.00318.87
8.3.30.0070.00718.80
8.3.20.0050.00320.34
8.3.10.0000.01021.95
8.3.00.0000.00822.10
8.2.180.0100.00318.29
8.2.170.0040.01122.96
8.2.160.0140.00718.86
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00419.45
8.2.120.0060.00326.35
8.2.110.0000.00919.30
8.2.100.0100.00317.91
8.2.90.0050.00319.30
8.2.80.0080.00018.05
8.2.70.0040.00417.75
8.2.60.0030.00517.91
8.2.50.0080.00018.10
8.2.40.0070.00020.60
8.2.30.0040.00419.28
8.2.20.0070.00318.02
8.2.10.0040.00417.97
8.2.00.0050.00217.98
8.1.280.0120.00625.92
8.1.270.0030.00523.88
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00422.69
8.1.230.0070.00319.16
8.1.220.0080.00417.74
8.1.210.0030.00618.77
8.1.200.0050.00517.23
8.1.190.0030.00517.35
8.1.180.0030.00518.10
8.1.170.0040.00418.69
8.1.160.0050.00218.92
8.1.150.0000.00818.88
8.1.140.0000.00719.57
8.1.130.0000.00718.76
8.1.120.0040.00417.42
8.1.110.0040.00417.43
8.1.100.0060.00317.36
8.1.90.0040.00417.49
8.1.80.0040.00417.36
8.1.70.0080.00017.36
8.1.60.0030.00617.48
8.1.50.0050.00317.50
8.1.40.0060.00317.39
8.1.30.0040.00417.62
8.1.20.0000.00817.57
8.1.10.0030.00617.62
8.1.00.0000.00817.53
8.0.300.0040.00419.71
8.0.290.0000.00816.63
8.0.280.0070.00018.44
8.0.270.0070.00017.25
8.0.260.0000.00616.68
8.0.250.0030.00316.99
8.0.240.0000.00716.95
8.0.230.0070.00016.91
8.0.220.0070.00016.91
8.0.210.0040.00316.82
8.0.200.0040.00416.93
8.0.190.0080.00016.94
8.0.180.0050.00216.93
8.0.170.0000.00716.77
8.0.160.0000.00716.86
8.0.150.0000.00716.80
8.0.140.0020.00516.68
8.0.130.0000.00613.36
8.0.120.0000.00716.86
8.0.110.0040.00416.73
8.0.100.0040.00416.83
8.0.90.0040.00416.76
8.0.80.0100.01016.88
8.0.70.0070.00016.75
8.0.60.0040.00416.73
8.0.50.0070.00016.88
8.0.30.0110.01517.22
8.0.20.0110.00917.40
8.0.10.0040.00416.98
8.0.00.0100.01116.99
7.4.330.0000.00515.55
7.4.320.0000.00716.57
7.4.300.0030.00316.40
7.4.290.0040.00416.53
7.4.280.0080.00016.38
7.4.270.0030.00316.52
7.4.260.0070.00016.44
7.4.250.0000.00716.41
7.4.240.0000.00716.52
7.4.230.0060.00316.27
7.4.220.0090.00916.33
7.4.210.0100.00716.47
7.4.200.0050.00216.33
7.4.160.0050.01016.50
7.4.150.0110.00717.40
7.4.140.0120.00717.86
7.4.130.0110.00716.54
7.4.120.0120.00916.47
7.4.110.0030.01416.40
7.4.100.0170.00416.63
7.4.90.0070.01116.48
7.4.80.0130.00319.39
7.4.70.0150.00416.64
7.4.60.0030.01216.55
7.4.50.0070.01016.57
7.4.40.0100.00616.53
7.4.30.0080.01216.39
7.4.10.0090.00615.13
7.4.00.0030.01614.91
7.3.330.0030.00313.13
7.3.320.0000.00613.19
7.3.310.0030.00316.41
7.3.300.0030.00316.16
7.3.290.0080.00716.20
7.3.280.0090.00916.18
7.3.270.0110.00517.40
7.3.260.0110.00616.35
7.3.250.0080.01016.25
7.3.240.0130.00716.29
7.3.230.0080.00816.52
7.3.210.0100.01016.53
7.3.200.0080.00816.51
7.3.190.0060.01016.38
7.3.180.0060.00916.44
7.3.170.0140.00716.17
7.3.160.0030.01216.46
7.3.130.0070.01114.95
7.3.120.0170.00314.39
7.3.110.0090.00914.77
7.3.100.0100.00714.65
7.3.90.0030.01314.49
7.3.80.0090.01114.64
7.3.70.0070.00414.41
7.3.60.0000.01214.87
7.3.50.0070.01114.84
7.3.40.0060.00914.93
7.3.30.0000.01214.60
7.3.20.0080.00816.83
7.3.10.0060.00916.64
7.3.00.0100.00716.64
7.2.330.0090.00916.74
7.2.320.0130.00316.60
7.2.310.0000.02316.35
7.2.300.0080.00816.72
7.2.290.0080.00816.70
7.2.260.0090.00615.31
7.2.250.0070.01414.95
7.2.240.0100.00614.88
7.2.230.0120.00314.93
7.2.220.0030.01314.66
7.2.210.0070.00415.02
7.2.200.0030.01215.13
7.2.190.0040.00815.09
7.2.180.0070.01314.83
7.2.170.0030.01514.89
7.2.160.0050.00814.88
7.2.150.0080.00416.93
7.2.140.0030.01016.78
7.2.130.0000.00916.75
7.2.120.0170.00016.90
7.2.110.0000.01416.92
7.2.100.0070.00716.95
7.2.90.0060.01116.93
7.2.80.0040.01117.02
7.2.70.0080.00816.77
7.2.60.0040.00916.89
7.2.50.0060.00917.00
7.2.40.0090.00317.00
7.2.30.0080.00817.10
7.2.20.0080.00416.95
7.2.10.0040.00816.76
7.2.00.0050.01218.07
7.1.330.0040.01215.80
7.1.320.0140.00715.85
7.1.310.0070.00715.84
7.1.300.0110.00715.63
7.1.290.0070.01015.84
7.1.280.0070.01015.82
7.1.270.0000.01315.47
7.1.260.0090.00015.64
7.1.250.0030.01315.65
7.1.240.0030.00615.95
7.1.230.0000.01615.64
7.1.220.0000.01215.57
7.1.210.0060.00615.75
7.1.200.0050.00915.73
7.1.190.0030.00615.65
7.1.180.0030.01015.48
7.1.170.0030.00915.73
7.1.160.0030.01315.62
7.1.150.0110.00415.77
7.1.140.0080.00415.83
7.1.130.0100.00615.71
7.1.120.0040.00715.86
7.1.110.0030.00915.86
7.1.100.0000.01116.93
7.1.90.0040.00715.88
7.1.80.0070.00315.81
7.1.70.0060.00716.46
7.1.60.0110.00825.50
7.1.50.0120.00925.26
7.1.40.0110.01025.02
7.1.30.0140.00625.07
7.1.20.0160.00525.16
7.1.10.0050.01116.13
7.1.00.0110.00416.22
7.0.330.0090.00315.34
7.0.320.0040.01115.46
7.0.310.0090.00615.59
7.0.300.0070.00615.31
7.0.290.0060.00315.09
7.0.280.0030.01015.45
7.0.270.0040.00415.32
7.0.260.0000.01015.15
7.0.250.0060.00915.64
7.0.240.0060.01015.34
7.0.230.0030.00715.38
7.0.220.0070.00715.53
7.0.210.0030.01015.55
7.0.200.0030.01016.24
7.0.190.0050.01016.10
7.0.180.0060.00915.99
7.0.170.0060.00815.84
7.0.160.0050.00715.84
7.0.150.0070.00715.77
7.0.140.0030.00915.73
7.0.130.0060.00915.91
7.0.120.0030.01115.85
7.0.110.0020.01015.93
7.0.100.0080.00515.88
7.0.90.0060.00815.88
7.0.80.0030.01015.94
7.0.70.0050.00915.90
7.0.60.0000.01115.52
7.0.50.0050.00715.91
7.0.40.0050.00814.89
7.0.30.0050.00815.04
7.0.20.0060.00815.06
7.0.10.0030.01114.95
7.0.00.0040.00914.97
5.6.400.0090.00614.18
5.6.390.0090.00614.66
5.6.380.0040.00414.57
5.6.370.0100.00614.29
5.6.360.0030.00714.17
5.6.350.0070.00714.50
5.6.340.0000.01014.41
5.6.330.0070.00714.74
5.6.320.0030.01414.52
5.6.310.0070.00714.30
5.6.300.0000.01114.70
5.6.290.0070.01014.14
5.6.280.0070.00714.36
5.6.270.0060.00614.48
5.6.260.0030.00814.31
5.6.250.0060.00614.38
5.6.240.0030.01014.74
5.6.230.0090.00614.60
5.6.220.0100.00014.55
5.6.210.0060.00614.38
5.6.200.0000.00914.59
5.6.190.0040.01114.51
5.6.180.0090.00614.36
5.6.170.0030.00914.45
5.6.160.0060.00614.21
5.6.150.0000.01614.29
5.6.140.0040.01114.51
5.6.130.0070.00714.56
5.6.120.0040.01414.57
5.6.110.0000.00914.27
5.6.100.0000.01014.58
5.6.90.0060.00914.44
5.6.80.0100.00314.40
5.6.70.0060.00914.14
5.6.60.0080.00414.16
5.6.50.0070.00714.31
5.6.40.0000.01314.41
5.6.30.0030.01014.64
5.6.20.0030.00714.11
5.6.10.0060.01214.45
5.6.00.0100.00014.41

preferences:
46.45 ms | 401 KiB | 5 Q