3v4l.org

run code in 300+ PHP versions simultaneously
<?php //if (version_compare(PHP_VERSION, '5.2', '<')) { // exit 'no json_encode() support'; //} $array = array('text' => "<h1>Кириллический URL</h1>\n<p>This is Cyrillic URL example. Try <a class=js-as dir=rtl href=עברית>RTL עברית</a>.</p>\n"); if (version_compare(PHP_VERSION, '5.4', '>=')) { $data = json_encode($array, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); } else { $data = preg_replace('/\\\\u([a-f0-9]{4})/e', "iconv('UCS-4LE','UTF-8',pack('V', hexdec('U$1')))", json_encode($array)); $data = str_replace('\\/', '/', json_encode($array)); } echo $data;

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.0120.00918.29
8.3.50.0150.00721.93
8.3.40.0110.00418.71
8.3.30.0000.01418.96
8.3.20.0040.00420.21
8.3.10.0090.00021.93
8.3.00.0040.00422.52
8.2.180.0060.00916.32
8.2.170.0120.00322.96
8.2.160.0170.00320.95
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0140.00426.16
8.2.120.0040.00419.36
8.2.110.0090.00022.20
8.2.100.0120.00019.57
8.2.90.0040.00419.05
8.2.80.0000.00817.97
8.2.70.0030.00617.25
8.2.60.0000.00817.80
8.2.50.0080.00018.07
8.2.40.0040.00418.22
8.2.30.0030.00518.05
8.2.20.0020.00517.70
8.2.10.0040.00417.80
8.2.00.0090.00317.73
8.1.280.0100.00725.92
8.1.270.0050.00321.89
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0040.00423.89
8.1.230.0040.00819.08
8.1.220.0030.00617.78
8.1.210.0040.00418.77
8.1.200.0040.00417.22
8.1.190.0040.00417.41
8.1.180.0000.00818.60
8.1.170.0090.00018.43
8.1.160.0040.00421.95
8.1.150.0020.00518.54
8.1.140.0000.00717.44
8.1.130.0030.00317.80
8.1.120.0000.00717.34
8.1.110.0030.00517.43
8.1.100.0030.00317.33
8.1.90.0000.00817.35
8.1.80.0000.00717.32
8.1.70.0030.00317.41
8.1.60.0040.00417.53
8.1.50.0000.00717.44
8.1.40.0040.00417.35
8.1.30.0000.00717.52
8.1.20.0040.00417.56
8.1.10.0040.00417.51
8.1.00.0000.00817.36
8.0.300.0000.00818.77
8.0.290.0040.00417.18
8.0.280.0000.00718.32
8.0.270.0000.00817.15
8.0.260.0040.00416.83
8.0.250.0040.00417.01
8.0.240.0050.00216.96
8.0.230.0000.00716.93
8.0.220.0070.00016.85
8.0.210.0000.00816.71
8.0.200.0000.00616.88
8.0.190.0070.00016.86
8.0.180.0050.00216.78
8.0.170.0050.00216.76
8.0.160.0000.00716.88
8.0.150.0050.00216.76
8.0.140.0030.00516.80
8.0.130.0030.00313.32
8.0.120.0040.00416.75
8.0.110.0080.00016.80
8.0.100.0040.00416.82
8.0.90.0030.00316.86
8.0.80.0120.00616.71
8.0.70.0000.00716.82
8.0.60.0000.00716.82
8.0.50.0000.00716.82
8.0.30.0100.00717.03
8.0.20.0080.01117.40
8.0.10.0000.00716.93
8.0.00.0090.00916.73
7.4.330.0050.00015.00
7.4.320.0030.00316.59
7.4.300.0030.00316.57
7.4.290.0000.00816.42
7.4.280.0080.00016.42
7.4.270.0000.00616.38
7.4.260.0060.00316.50
7.4.250.0000.00716.47
7.4.240.0040.00416.51
7.4.230.0030.00316.43
7.4.220.0170.01016.39
7.4.210.0090.00916.54
7.4.200.0040.00416.32
7.4.190.0070.00016.71
7.4.160.0050.01016.48
7.4.150.0070.01017.40
7.4.140.0160.00317.86
7.4.130.0050.01216.37
7.4.120.0100.00716.42
7.4.110.0060.01216.51
7.4.100.0100.01016.49
7.4.90.0110.00616.53
7.4.80.0070.01019.39
7.4.70.0090.00616.47
7.4.60.0040.01216.42
7.4.50.0040.00416.19
7.4.40.0150.00422.77
7.4.30.0090.00916.29
7.4.00.0040.01114.89
7.3.330.0000.00512.95
7.3.320.0000.00613.10
7.3.310.0040.00416.27
7.3.300.0040.00416.25
7.3.290.0090.00616.15
7.3.280.0100.00716.22
7.3.270.0130.00317.40
7.3.260.0140.00616.26
7.3.250.0090.00916.30
7.3.240.0070.01016.32
7.3.230.0110.01116.39
7.3.210.0170.00316.40
7.3.200.0130.00819.39
7.3.190.0030.01316.45
7.3.180.0060.00916.26
7.3.170.0110.01116.27
7.3.160.0030.01216.58
7.3.120.0100.00614.54
7.3.110.0070.01014.95
7.3.100.0030.01314.93
7.3.90.0030.00714.77
7.3.80.0120.00314.67
7.3.70.0030.00914.93
7.3.60.0120.00314.86
7.3.50.0090.00614.85
7.3.40.0070.00714.76
7.3.30.0070.00714.84
7.3.20.0060.00916.47
7.3.10.0030.00916.74
7.3.00.0080.00316.55
7.2.330.0130.00316.55
7.2.320.0080.00816.47
7.2.310.0090.00816.67
7.2.300.0130.00316.76
7.2.290.0100.00616.64
7.2.240.0100.00715.21
7.2.230.0000.01514.52
7.2.220.0090.00614.89
7.2.210.0080.00414.96
7.2.200.0040.01415.01
7.2.190.0000.01315.00
7.2.180.0100.00314.73
7.2.170.0030.00714.83
7.2.160.0100.00715.03
7.2.150.0040.00816.72
7.2.140.0080.00816.93
7.2.130.0120.00316.84
7.2.120.0030.00916.88
7.2.110.0060.01016.68
7.2.100.0030.01616.57
7.2.90.0120.00316.81
7.2.80.0060.00916.74
7.2.70.0030.01316.51
7.2.60.0040.01116.94
7.2.50.0100.00316.60
7.2.40.0070.00716.94
7.2.30.0040.00716.91
7.2.20.0100.00716.89
7.2.10.0070.00716.84
7.2.00.0070.01217.90
7.1.330.0100.00315.75
7.1.320.0000.00815.75
7.1.310.0040.01115.76
7.1.300.0030.01315.81
7.1.290.0040.01215.63
7.1.280.0120.00315.60
7.1.270.0120.00616.02
7.1.260.0120.00315.95
7.1.250.0060.00915.84
7.1.200.0000.01115.75
7.1.100.0130.00617.92
7.1.70.0080.00016.86
7.1.60.0100.01619.82
7.1.50.0060.01316.93
7.1.00.0000.08022.27
7.0.200.0050.00516.76
7.0.140.0070.06722.08
7.0.90.0100.04719.96
7.0.80.0230.03319.91
7.0.70.0270.03019.91
7.0.60.0070.03719.95
7.0.50.0100.04320.28
7.0.40.0070.03720.14
7.0.30.0130.03319.95
7.0.20.0130.03020.04
7.0.10.0100.03720.01
7.0.00.0030.04720.14
5.6.280.0100.06721.12
5.6.240.0000.05020.64
5.6.230.0030.04020.63
5.6.220.0100.03320.58
5.6.210.0070.03320.55
5.6.200.0030.04021.01
5.6.190.0100.07021.11
5.6.180.0070.04021.11
5.6.170.0100.04721.03
5.6.160.0070.06321.04
5.6.150.0100.03021.00
5.6.140.0030.04321.00
5.6.130.0000.04721.03
5.6.120.0030.07720.95
5.6.110.0000.04721.09
5.6.100.0000.04321.12
5.6.90.0030.04321.14
5.6.80.0030.04020.46
5.6.70.0100.03720.41
5.6.60.0070.07320.44
5.6.50.0100.07720.48
5.6.40.0030.07320.38
5.6.30.0170.07720.39
5.6.20.0070.04720.40
5.6.10.0170.07320.41
5.6.00.0070.05020.42
5.5.380.0070.03720.36
5.5.370.0000.04320.40
5.5.360.0070.04020.41
5.5.350.0000.04720.34
5.5.340.0070.03720.83
5.5.330.0030.04020.63
5.5.320.0030.04020.75
5.5.310.0070.04020.92
5.5.300.0030.03720.88
5.5.290.0030.04320.91
5.5.280.0030.04720.88
5.5.270.0030.04720.86
5.5.260.0070.08720.90
5.5.250.0070.03320.45
5.5.240.0000.03720.30
5.5.230.0070.08020.29
5.5.220.0030.03320.19
5.5.210.0130.05020.18
5.5.200.0100.06020.08
5.5.190.0130.07320.11
5.5.180.0030.07320.25
5.5.160.0170.03720.25
5.5.150.0030.07020.11
5.5.140.0070.04320.10
5.5.130.0000.08319.98
5.5.120.0070.06720.17
5.5.110.0330.03720.21
5.5.100.0100.07320.07
5.5.90.0030.07320.09
5.5.80.0130.07320.14
5.5.70.0200.04320.15
5.5.60.0130.07719.99
5.5.50.0100.07020.07
5.5.40.0170.08719.99
5.5.30.0070.06720.10
5.5.20.0030.07320.04
5.5.10.0130.03319.97
5.5.00.0000.06320.14
5.4.450.0030.05719.11
5.4.440.0070.03719.40
5.4.430.0000.04719.39
5.4.420.0030.04319.38
5.4.410.0100.04019.22
5.4.400.0000.04018.91
5.4.390.0030.03718.95
5.4.380.0130.06319.04
5.4.370.0000.08019.06
5.4.360.0130.06719.10
5.4.350.0070.08019.10
5.4.340.0100.06319.12
5.4.320.0000.05318.93
5.4.310.0030.06718.96
5.4.300.0130.06718.80
5.4.290.0070.07319.03
5.4.280.0100.07019.12
5.4.270.0070.06718.78
5.4.260.0130.07019.09
5.4.250.0000.04319.02
5.4.240.0070.06318.95
5.4.230.0070.06718.96
5.4.220.0100.08718.96
5.4.210.0100.07319.09
5.4.200.0100.06718.99
5.4.190.0100.08019.13
5.4.180.0130.05319.01
5.4.170.0100.07719.02
5.4.160.0070.07318.90
5.4.150.0000.04319.04
5.4.140.0070.07716.32
5.4.130.0130.04316.28
5.4.120.0030.07316.01
5.4.110.0100.06716.32
5.4.100.0100.07316.21
5.4.90.0200.04316.38
5.4.80.0000.05016.42
5.4.70.0070.08716.29
5.4.60.0170.07316.35
5.4.50.0030.03716.38
5.4.40.0030.05716.47
5.4.30.0000.06016.37
5.4.20.0030.08016.41
5.4.10.0000.04016.37
5.4.00.0070.06715.66
5.3.290.0030.08314.77
5.3.280.0170.07014.62
5.3.270.0070.05714.58
5.3.260.0070.04314.60
5.3.250.0100.04314.63
5.3.240.0100.05314.61
5.3.230.0070.06014.62
5.3.220.0100.07714.70
5.3.210.0000.05714.56
5.3.200.0070.05014.68
5.3.190.0100.07314.69
5.3.180.0070.08014.58
5.3.170.0000.04714.71
5.3.160.0100.07314.63
5.3.150.0030.06314.71
5.3.140.0070.05714.71
5.3.130.0030.06014.57
5.3.120.0030.06014.67
5.3.110.0100.04014.62
5.3.100.0100.07714.02
5.3.90.0000.08314.17
5.3.80.0130.07014.17
5.3.70.0070.04314.14
5.3.60.0070.03714.14
5.3.50.0000.08313.86
5.3.40.0070.07714.09
5.3.30.0070.06713.82
5.3.20.0000.04313.76
5.3.10.0070.07013.80
5.3.00.0100.06013.80
5.2.170.0030.06011.13
5.2.160.0130.04311.25
5.2.150.0070.04311.26
5.2.140.0000.03711.32
5.2.130.0100.06011.11
5.2.120.0170.05011.20
5.2.110.0100.06011.21
5.2.100.0070.05311.24
5.2.90.0070.04711.25
5.2.80.0100.06011.25
5.2.70.0030.05311.32
5.2.60.0000.07011.16
5.2.50.0070.05011.10
5.2.40.0130.05311.00
5.2.30.0000.05310.99
5.2.20.0000.05711.15
5.2.10.0100.05311.03
5.2.00.0070.05711.00
5.1.60.0100.0479.98
5.1.50.0100.03010.01
5.1.40.0030.03010.05
5.1.30.0000.03310.39
5.1.20.0070.03010.37
5.1.10.0000.03310.06
5.1.00.0000.02710.11
5.0.50.0030.0478.61
5.0.40.0030.0408.26
5.0.30.0070.0678.07
5.0.20.0000.0338.19
5.0.10.0100.0378.26
5.0.00.0070.0578.23
4.4.90.0070.0177.38
4.4.80.0000.0307.38
4.4.70.0070.0277.38
4.4.60.0030.0337.38
4.4.50.0030.0337.38
4.4.40.0070.0277.38
4.4.30.0000.0277.38
4.4.20.0070.0277.38
4.4.10.0000.0177.38
4.4.00.0030.0437.38
4.3.110.0030.0237.38
4.3.100.0000.0407.38
4.3.90.0000.0377.38
4.3.80.0000.0377.38
4.3.70.0000.0337.38
4.3.60.0000.0377.38
4.3.50.0030.0277.38
4.3.40.0000.0407.38
4.3.30.0000.0307.38
4.3.20.0030.0207.38
4.3.10.0000.0377.38
4.3.00.0000.0307.38

preferences:
40.52 ms | 401 KiB | 5 Q