3v4l.org

run code in 300+ PHP versions simultaneously
<?php $isAdult = false; $truth = 2 < 3; echo $truth ? 'Yes two is less than three.' : 'NO two is NOT less than three.';?> <li class='<?php echo $isAdult ? "adult" : "child"; ?>'> array array_slice ( array $array , int $offset [, int $length = NULL [, bool $preserve_keys = false ]] ) $array = ['1','2','3', '4', '5', '6']; print_r(array_slice($array, 0, 3));

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.70.0150.00018.18
8.3.60.0040.01116.75
8.3.50.0120.00916.39
8.3.40.0120.00318.71
8.3.30.0070.01118.60
8.3.20.0000.00820.13
8.3.10.0050.00323.71
8.3.00.0040.00422.14
8.2.180.0150.00616.38
8.2.170.0140.00022.96
8.2.160.0100.00319.02
8.2.150.0120.00324.18
8.2.140.0080.00024.66
8.2.130.0120.00621.11
8.2.120.0000.00826.35
8.2.110.0060.00322.30
8.2.100.0120.00017.91
8.2.90.0040.00418.34
8.2.80.0050.00217.97
8.2.70.0050.00317.50
8.2.60.0040.00417.93
8.2.50.0030.00518.10
8.2.40.0050.00220.47
8.2.30.0000.00820.98
8.2.20.0040.00418.06
8.2.10.0060.00317.86
8.2.00.0000.00717.91
8.1.280.0040.01125.92
8.1.270.0040.00422.02
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0000.00822.06
8.1.230.0070.00420.95
8.1.220.0000.00817.76
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0050.00317.10
8.1.180.0050.00318.10
8.1.170.0030.00518.52
8.1.160.0050.00319.00
8.1.150.0000.00718.72
8.1.140.0080.00019.45
8.1.130.0000.00718.73
8.1.120.0000.00917.40
8.1.110.0040.00417.25
8.1.100.0000.00817.43
8.1.90.0000.00717.43
8.1.80.0030.00317.45
8.1.70.0030.00317.37
8.1.60.0030.00517.49
8.1.50.0030.00517.43
8.1.40.0030.00617.49
8.1.30.0060.00317.53
8.1.20.0000.00917.49
8.1.10.0000.00917.54
8.1.00.0020.00517.45
8.0.300.0040.00420.16
8.0.290.0000.00716.63
8.0.280.0030.00318.48
8.0.270.0030.00317.16
8.0.260.0100.00016.88
8.0.250.0070.00016.94
8.0.240.0080.00016.91
8.0.230.0000.00816.88
8.0.220.0050.00316.80
8.0.210.0030.00316.88
8.0.200.0000.00616.76
8.0.190.0040.00416.87
8.0.180.0030.00316.73
8.0.170.0000.00716.84
8.0.160.0030.00316.82
8.0.150.0000.00816.79
8.0.140.0040.00416.81
8.0.130.0030.00313.30
8.0.120.0050.00316.73
8.0.110.0040.00416.87
8.0.100.0070.00016.76
8.0.90.0040.00416.69
8.0.80.0110.00516.82
8.0.70.0080.00016.82
8.0.60.0030.00516.88
8.0.50.0070.00016.68
8.0.30.0120.00616.90
8.0.20.0110.01017.40
8.0.10.0030.00316.76
8.0.00.0090.00916.62
7.4.330.0020.00215.55
7.4.320.0030.00516.44
7.4.300.0030.00316.47
7.4.290.0030.00316.56
7.4.280.0030.00516.43
7.4.270.0070.00016.28
7.4.260.0000.00716.37
7.4.250.0030.00316.38
7.4.240.0070.00016.58
7.4.230.0030.00316.49
7.4.220.0190.00716.42
7.4.210.0080.00816.43
7.4.200.0000.00616.27
7.4.160.0150.00416.53
7.4.150.0070.01017.40
7.4.140.0140.00617.86
7.4.130.0090.00916.28
7.4.120.0070.01016.52
7.4.110.0030.01316.27
7.4.100.0070.01016.23
7.4.90.0090.00616.39
7.4.80.0080.00819.39
7.4.70.0130.00316.46
7.4.60.0100.00716.34
7.4.50.0030.01116.23
7.4.40.0100.01016.32
7.4.30.0100.00716.38
7.4.00.0050.00814.71
7.3.330.0040.00312.93
7.3.320.0060.00013.04
7.3.310.0060.00316.21
7.3.300.0030.00316.06
7.3.290.0000.00816.02
7.3.280.0070.00916.09
7.3.270.0170.00317.40
7.3.260.0140.00416.38
7.3.250.0090.00816.21
7.3.240.0180.00916.32
7.3.230.0100.00716.32
7.3.210.0060.01016.38
7.3.200.0030.01316.49
7.3.190.0070.01016.51
7.3.180.0070.01016.35
7.3.170.0040.01116.52
7.3.160.0060.00916.45
7.3.120.0100.00714.46
7.3.110.0090.00314.48
7.3.100.0050.00514.68
7.3.90.0070.01014.86
7.3.80.0070.01014.63
7.3.70.0040.01114.70
7.3.60.0000.00814.82
7.3.50.0030.01114.62
7.3.40.0040.00714.81
7.3.30.0070.00714.53
7.3.20.0030.01016.64
7.3.10.0030.00716.50
7.3.00.0060.01216.57
7.2.330.0100.00716.62
7.2.320.0180.00316.37
7.2.310.0100.00716.35
7.2.300.0060.01516.47
7.2.290.0100.01316.63
7.2.250.0120.00714.95
7.2.240.0030.01714.73
7.2.230.0070.00714.70
7.2.220.0090.00614.94
7.2.210.0060.00314.83
7.2.200.0030.01014.58
7.2.190.0060.00615.03
7.2.180.0030.01014.57
7.2.170.0090.00614.92
7.2.60.0060.00616.61
7.2.00.0040.01119.39
7.1.330.0070.00715.50
7.1.320.0100.00315.56
7.1.310.0060.00915.75
7.1.300.0030.01215.39
7.1.290.0030.00715.32
7.1.280.0090.00615.54
7.1.270.0030.01015.60
7.1.260.0090.00615.64
7.1.200.0170.00015.68
7.1.100.0090.00918.00
7.1.70.0060.01016.70
7.1.60.0270.00334.88
7.1.50.0240.01234.81
7.1.40.0200.01034.32
7.1.30.0230.01734.39
7.1.20.0140.01834.45
7.1.10.0060.00916.36
7.1.00.0100.00716.61
7.0.200.0090.00616.69
7.0.190.0060.00916.53
7.0.180.0100.00716.24
7.0.170.0100.00815.93
7.0.160.0050.01016.07
7.0.150.0120.00316.19
7.0.140.0100.00616.27
7.0.130.0060.01016.34
7.0.120.0090.00616.31
7.0.110.0030.01316.13
7.0.100.0000.01716.17
7.0.90.0070.01316.27
7.0.80.0000.01616.43
7.0.70.0110.01116.13
7.0.60.0030.01615.94
7.0.50.0060.01416.32
7.0.40.0080.01116.31
7.0.30.0060.00916.54
7.0.20.0040.01216.26
7.0.10.0040.01116.57
7.0.00.0030.00916.39

preferences:
57.55 ms | 401 KiB | 5 Q