3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(0); $length=3; $arr_u = array(); $arr_m = array(); $arr_d = array(); $arr_t = array(); $utf8string = ''; $charset=sprintf('%s', implode('',array_merge(range('0', '9'),range('a', 'f')))); for($i=0;$i<strlen($charset);$i++) $a[]=$charset{$i}; for($i=0,$c="",$d="chk(";$i<$length;$i++){ $c.="foreach(\$a as \$b[$i])"; $d.="\$b[$i]."; } eval($c.$d."\"\n\");"); function chk($str){ global $arr_u ,$arr_t, $arr_m, $arr_d; array_push($arr_t,"U+0$str"); } global $arr_u ,$arr_t, $arr_m, $arr_d, $utf8string; for($i=0; $i<52; $i++){ array_push($arr_u,$arr_t[rand(0,count($arr_t))]); } for($i=0; $i<40; $i++){ array_push($arr_d,$arr_t[rand(0,count($arr_t))]); } for($i=0; $i<23; $i++){ array_push($arr_m,$arr_t[rand(0,count($arr_t))]); } $utf8string = html_entity_decode(preg_replace("/U\+([0-9a-f]{4})/", "&#x\\1;", implode("\n",array_merge($arr_u, $arr_d, $arr_m))), ENT_NOQUOTES, 'UTF-8'); print $utf8string;

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)
7.4.10.0080.01115.41
7.4.00.0070.01415.46
7.3.130.0100.01015.20
7.3.120.0060.01515.00
7.3.110.0060.01515.55
7.3.100.0000.01915.18
7.3.90.0090.00615.63
7.3.80.0000.02015.32
7.3.70.0070.01315.43
7.3.60.0030.01015.40
7.3.50.0120.00615.48
7.3.40.0060.00915.36
7.3.30.0040.01115.41
7.3.20.0060.01216.72
7.3.10.0160.00716.91
7.3.00.0140.00416.58
7.2.260.0060.01615.46
7.2.250.0060.01515.28
7.2.240.0090.00915.49
7.2.230.0000.01815.46
7.2.220.0070.01115.45
7.2.210.0030.01715.68
7.2.200.0100.00715.67
7.2.190.0000.01715.52
7.2.180.0070.01015.72
7.2.170.0030.01015.45
7.2.160.0030.00915.30
7.2.150.0070.00717.25
7.2.140.0090.00617.34
7.2.130.0140.01017.04
7.2.120.0300.00717.01
7.2.110.0140.01316.96
7.2.100.0310.01016.96
7.2.90.0090.01117.04
7.2.80.0080.01416.77
7.2.70.0110.01216.75
7.2.60.0080.01317.04
7.2.50.0110.00917.08
7.2.40.0080.01116.88
7.2.30.0270.00817.17
7.2.20.0170.01116.91
7.2.10.0170.01017.07
7.2.00.0040.01317.89
7.1.330.0070.01015.94
7.1.320.0080.00416.20
7.1.310.0040.01416.15
7.1.300.0110.00716.12
7.1.290.0030.01015.64
7.1.280.0030.00916.14
7.1.270.0060.01116.12
7.1.260.0000.01615.91
7.1.250.0270.00516.00
7.1.240.0040.01116.03
7.1.230.0030.01015.71
7.1.220.0080.00815.75
7.1.210.0000.01815.89
7.1.200.0040.00715.88
7.1.190.0070.01016.00
7.1.180.0070.01016.02
7.1.170.0070.01315.90
7.1.160.0070.01115.95
7.1.150.0000.01415.88
7.1.140.0000.02016.20
7.1.130.0070.00716.10
7.1.120.0000.01316.13
7.1.110.0030.01315.89
7.1.100.0000.01516.02
7.1.90.0090.00615.88
7.1.80.0080.00816.15
7.1.70.0020.01116.65
7.1.60.0080.01317.61
7.1.50.0050.01616.62
7.1.40.0150.00815.71
7.1.30.0000.01715.75
7.1.20.0030.01616.11
7.1.10.0070.01116.05
7.1.00.0000.04819.25
7.0.330.0040.01415.55
7.0.320.0000.01415.68
7.0.310.0000.01015.73
7.0.300.0030.00715.47
7.0.290.0090.00915.60
7.0.280.0030.00815.48
7.0.270.0090.00615.67
7.0.260.0040.00815.63
7.0.250.0080.01115.58
7.0.240.0030.01415.75
7.0.230.0030.01015.77
7.0.220.0060.01015.79
7.0.210.0000.01515.65
7.0.200.0040.00716.22
7.0.190.0030.01315.67
7.0.180.0070.01015.55
7.0.170.0040.01115.50
7.0.160.0030.01315.61
7.0.150.0040.01515.70
7.0.140.0030.04418.75
7.0.130.0000.01315.36
7.0.120.0030.03818.81
7.0.110.0030.01415.53
7.0.100.0090.00915.37
7.0.90.0030.01315.75
7.0.80.0110.00715.69
7.0.70.0030.00715.72
7.0.60.0050.02717.93
7.0.50.0040.02616.97
7.0.40.0080.04516.99
7.0.30.0120.02416.87
7.0.20.0180.04716.89
7.0.10.0050.02817.01
7.0.00.0050.02716.77
5.6.400.0070.02715.69
5.6.390.0030.03815.37
5.6.380.0090.03115.58
5.6.370.0100.03015.73
5.6.360.0030.03815.57
5.6.350.0100.03315.83
5.6.340.0000.04215.77
5.6.330.0000.03915.90
5.6.320.0100.03515.36
5.6.310.0060.03215.79
5.6.300.0000.03115.21
5.6.290.0070.02815.65
5.6.280.0050.06818.88
5.6.270.0030.03515.54
5.6.260.0070.03015.64
5.6.250.0030.03615.54
5.6.240.0100.02915.64
5.6.230.0070.03015.37
5.6.220.0100.02615.83
5.6.210.0050.06118.62
5.6.200.0030.05917.48
5.6.190.0080.06518.34
5.6.180.0280.04118.39
5.6.170.0180.06718.47
5.6.160.0100.06418.42
5.6.150.0110.06317.31
5.6.140.0050.04617.54
5.6.130.0120.04017.28
5.6.120.0100.07318.80
5.6.110.0080.05918.97
5.6.100.0100.05018.88
5.6.90.0080.05918.84
5.6.80.0050.06418.54
5.6.70.0030.03715.54
5.6.60.0000.03715.33
5.6.50.0070.03215.43
5.6.40.0100.03015.37
5.6.30.0000.03515.55
5.6.20.0000.03515.52
5.6.10.0030.03415.40
5.6.00.0140.02415.73
5.5.380.0070.02715.53
5.5.370.0100.03015.30
5.5.360.0070.03315.20
5.5.350.2170.04218.54
5.5.340.0030.07317.21
5.5.330.0080.06218.42
5.5.320.0100.05718.41
5.5.310.0230.06018.29
5.5.300.0050.06217.22
5.5.290.0100.06617.28
5.5.280.0080.06218.57
5.5.270.0110.05218.58
5.5.260.0080.06818.80
5.5.250.0100.03818.48
5.5.240.0080.04618.43
5.5.230.0070.03315.43
5.5.220.0100.03315.59
5.5.210.0070.03415.22
5.5.200.0030.03115.38
5.5.190.0100.03015.08
5.5.180.0000.04115.45
5.5.170.0070.03015.57
5.5.160.0030.03315.18
5.5.150.0000.03615.61
5.5.140.0110.02815.32
5.5.130.0000.03715.43
5.5.120.0030.03215.68
5.5.110.0060.03515.54
5.5.100.0100.03215.03
5.5.90.0000.03715.48
5.5.80.0090.02115.56
5.5.70.0000.03815.64
5.5.60.0030.03415.53
5.5.50.0130.02915.23
5.5.40.0030.03615.34
5.5.30.0030.03515.19
5.5.20.0070.02915.49
5.5.10.0030.03215.08
5.5.00.0030.03715.47
5.4.450.0220.06116.31
5.4.440.0150.04516.38
5.4.430.0080.04616.50
5.4.420.0130.04216.43
5.4.410.0150.04216.18
5.4.400.0180.03716.28
5.4.390.0170.06116.08
5.4.380.0180.05916.17
5.4.370.0100.04516.12
5.4.360.0130.06616.09
5.4.350.0150.06416.14
5.4.340.0120.06616.16
5.4.330.0000.03812.41
5.4.320.0170.05516.12
5.4.310.0320.05616.12
5.4.300.0170.05516.22
5.4.290.0180.06516.13
5.4.280.0270.05516.08
5.4.270.0150.06316.06
5.4.260.0190.05916.15
5.4.250.0150.06716.21
5.4.240.0170.06315.99
5.4.230.0180.05916.04
5.4.220.0150.04616.08
5.4.210.0150.04316.00
5.4.200.0170.06016.22
5.4.190.0150.05816.07
5.4.180.0190.06416.10
5.4.170.0150.05616.13
5.4.160.0130.06716.21
5.4.150.0260.04616.26
5.4.140.0220.05314.91
5.4.130.0220.04714.84
5.4.120.0170.06314.64
5.4.110.0130.06714.87
5.4.100.0250.05914.91
5.4.90.0170.06314.89
5.4.80.0130.04614.83
5.4.70.0200.05114.84
5.4.60.0200.05614.76
5.4.50.0150.05914.97
5.4.40.0220.06014.69
5.4.30.0150.06314.74
5.4.20.0180.05114.94
5.4.10.0210.06614.74
5.4.00.0180.05214.62
5.3.290.0180.06613.60
5.3.280.0200.06213.54
5.3.270.0180.06513.53
5.3.260.0170.05713.50
5.3.250.0180.05313.58
5.3.240.0180.05513.66
5.3.230.0130.04313.52
5.3.220.0150.05213.53
5.3.210.0200.05013.49
5.3.200.0220.04813.53
5.3.190.0150.05213.54
5.3.180.0230.04613.57
5.3.170.0170.06413.54
5.3.160.0250.04713.53
5.3.150.0130.05513.63
5.3.140.0170.06513.56
5.3.130.0130.06613.64
5.3.120.0150.06913.50
5.3.110.0210.05713.52
5.3.100.0220.05313.24
5.3.90.0200.06013.30
5.3.80.0200.05913.25
5.3.70.0250.05713.21
5.3.60.0150.07013.29
5.3.50.0200.06513.18
5.3.40.0130.06713.24
5.3.30.0200.06113.22
5.3.20.0200.06613.20
5.3.10.0120.06513.02
5.3.00.0130.04513.10
5.2.170.0300.07712.04
5.2.160.0270.09011.90
5.2.150.0200.07312.02
5.2.140.0300.09311.88
5.2.130.0270.09012.13
5.2.120.0300.09012.13
5.2.110.0200.06011.82
5.2.100.0170.05712.06
5.2.90.0300.08012.06
5.2.80.0230.08311.88
5.2.70.0430.05012.05
5.2.60.0300.08711.94
5.2.50.0330.09011.93
5.2.40.0230.10011.84
5.2.30.0270.09011.82
5.2.20.0230.09711.81
5.2.10.0230.09311.63
5.2.00.0230.06711.63
5.1.60.0200.09011.34
5.1.50.0270.08711.40
5.1.40.0200.09011.38
5.1.30.0200.08011.57
5.1.20.0300.04011.65
5.1.10.0170.08011.37
5.1.00.0170.06711.27
5.0.50.0100.09310.86
5.0.40.0070.06310.86
5.0.30.0070.09010.86
5.0.20.0100.09710.94
5.0.10.0030.06310.98
5.0.00.0100.11010.98
4.4.90.0100.07010.05
4.4.80.0100.09310.05
4.4.70.0100.09010.14
4.4.60.0170.07710.27
4.4.50.0130.05310.41
4.4.40.0100.08710.63
4.4.30.0130.05310.86
4.4.20.0170.05310.86
4.4.10.0100.06710.86
4.4.00.0100.07310.86
4.3.110.0130.04010.86
4.3.100.0070.04710.86
4.3.90.0100.08010.94
4.3.80.0100.10310.98
4.3.70.0070.06710.98
4.3.60.0130.06310.98
4.3.50.0070.06311.05
4.3.40.0100.08711.34
4.3.30.0030.09311.59
4.3.20.0070.07011.73
4.3.10.0000.07311.73
4.3.00.0070.08011.73

preferences:
42.7 ms | 401 KiB | 5 Q