3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Proof of Nonsense by Stephan Schmitz @ code.eyecatch-up.de // Complex and inefficient way of a php 'hello world' output function subval_sort($a,$subkey) { foreach($a as $k=>$v) { $b[$k] = strtolower($v[$subkey]); } asort($b); foreach($b as $key=>$val) { $c[] = $a[$key]; } return $c; } $a = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'); $p = array('4', '12', '18', '15', '23', '15', '12', '12', '5', '8'); $ls = ''; foreach ($p as $l){ $pa = $l - 1; $ls .= $a[$pa].'|'; } $ls = substr($ls, 0, -1); $ls = explode('|', $ls); $i = count($ls); $o = array(); foreach ($ls as $l){ $o[] = array( 'l' => $l, 'p' => $i ); $i = $i - 1; } $o = subval_sort($o,'p'); $ohw = ''; foreach ($o as $l){ $ohw .= $l['l']; } $oh = substr($ohw, 0, -5); $ow = strrev($ohw); $ow = substr($ow, 0, -5); $ow = strrev($ow); $oh = ucfirst($oh); $ow = ucfirst($ow); echo $oh; echo ' '; echo $ow;

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.0150.00718.55
8.3.50.0080.00922.80
8.3.40.0070.00718.98
8.3.30.0070.00719.12
8.3.20.0000.00820.16
8.3.10.0060.00320.46
8.3.00.0040.00419.02
8.2.180.0090.00918.06
8.2.170.0100.01022.96
8.2.160.0100.00320.46
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0050.00319.48
8.2.110.0070.01021.12
8.2.100.0120.00017.76
8.2.90.0040.00419.25
8.2.80.0030.00617.97
8.2.70.0100.00017.71
8.2.60.0050.00317.93
8.2.50.0080.00018.07
8.2.40.0000.00818.34
8.2.30.0000.00721.21
8.2.20.0000.00817.71
8.2.10.0030.00518.14
8.2.00.0050.00217.70
8.1.280.0100.01325.92
8.1.270.0000.00823.83
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0100.00019.16
8.1.230.0030.00717.42
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0060.00617.25
8.1.180.0040.00418.10
8.1.170.0030.00518.65
8.1.160.0040.00418.90
8.1.150.0030.00618.84
8.1.140.0040.00417.47
8.1.130.0040.00417.86
8.1.120.0040.00317.49
8.1.110.0000.00817.47
8.1.100.0000.00717.54
8.1.90.0000.00717.47
8.1.80.0000.00717.43
8.1.70.0080.00017.50
8.1.60.0050.00317.50
8.1.50.0030.00517.53
8.1.40.0040.00417.52
8.1.30.0040.00417.57
8.1.20.0030.00617.55
8.1.10.0050.00317.53
8.1.00.0030.00517.64
8.0.300.0000.00818.77
8.0.290.0070.00016.75
8.0.280.0030.00318.48
8.0.270.0000.00716.84
8.0.260.0000.00718.48
8.0.250.0000.00616.96
8.0.240.0080.00017.08
8.0.230.0040.00416.92
8.0.220.0030.00317.00
8.0.210.0000.00716.99
8.0.200.0030.00317.00
8.0.190.0070.00017.06
8.0.180.0040.00416.87
8.0.170.0000.00816.99
8.0.160.0030.00317.01
8.0.150.0040.00416.91
8.0.140.0000.00716.94
8.0.130.0030.00313.36
8.0.120.0040.00416.95
8.0.110.0000.00716.98
8.0.100.0040.00416.96
8.0.90.0040.00416.85
8.0.80.0070.01416.87
8.0.70.0050.00316.86
8.0.60.0020.00516.85
8.0.50.0040.00417.02
8.0.30.0180.00417.25
8.0.20.0130.00617.40
8.0.10.0050.00217.09
8.0.00.0120.00816.61
7.4.330.0000.00515.09
7.4.320.0000.00716.63
7.4.300.0000.00716.60
7.4.290.0030.00316.42
7.4.280.0030.00516.63
7.4.270.0000.00816.55
7.4.260.0040.00416.52
7.4.250.0040.00416.60
7.4.240.0020.00516.53
7.4.230.0000.00716.37
7.4.220.0070.01016.71
7.4.210.0070.01016.67
7.4.200.0070.00016.73
7.4.160.0100.00616.57
7.4.150.0110.01117.40
7.4.140.0120.00617.86
7.4.130.0050.01716.64
7.4.120.0050.01216.58
7.4.110.0120.00616.68
7.4.100.0060.01216.44
7.4.90.0100.00716.42
7.4.80.0140.00716.43
7.4.70.0040.01416.59
7.4.60.0120.00616.64
7.4.50.0000.00916.55
7.4.40.0140.00316.65
7.4.30.0070.01016.41
7.4.00.0000.01715.18
7.3.330.0000.00713.20
7.3.320.0000.00513.26
7.3.310.0070.00016.45
7.3.300.0050.00216.27
7.3.290.0090.00516.37
7.3.280.0110.00716.37
7.3.270.0090.00917.40
7.3.260.0060.01216.75
7.3.250.0060.01316.52
7.3.240.0080.01416.41
7.3.230.0070.01416.52
7.3.210.0150.00416.48
7.3.200.0120.00919.39
7.3.190.0050.01316.63
7.3.180.0070.00916.45
7.3.170.0090.00916.48
7.3.160.0090.00616.38
7.2.330.0120.00416.73
7.2.320.0130.00616.77
7.2.310.0080.00816.72
7.2.300.0100.00716.78
7.2.290.0090.01116.79
7.2.00.0040.00719.58
7.1.200.0040.00415.94
7.1.100.0060.01018.38
7.1.70.0000.00816.93
7.1.60.0070.01819.34
7.1.50.0170.00717.02
7.1.00.0070.07022.57
7.0.200.0070.00016.85
7.0.140.0030.04322.08
7.0.60.0170.07319.95
7.0.50.0200.05717.88
7.0.40.0030.04320.27
7.0.30.0470.08020.24
7.0.20.0300.08020.15
7.0.10.0030.08320.20
7.0.00.0070.04320.22
5.6.280.0070.07020.84
5.6.210.0000.04720.69
5.6.200.0070.05718.19
5.6.190.0070.07320.61
5.6.180.0000.04320.55
5.6.170.0170.04020.55
5.6.160.0130.07720.52
5.6.150.0030.07318.19
5.6.140.0130.07018.18
5.6.130.0100.08018.15
5.6.120.0070.05321.00
5.6.110.0170.03321.12
5.6.100.0070.04021.03
5.6.90.0070.06720.98
5.6.80.0070.08020.43
5.5.350.0030.08020.43
5.5.340.0100.04318.08
5.5.330.0000.06720.27
5.5.320.0230.08720.25
5.5.310.0400.06720.32
5.5.300.0030.04318.05
5.5.290.0100.07018.08
5.5.280.0030.08320.70
5.5.270.0230.06720.81
5.5.260.0170.07720.90
5.5.250.0130.07720.47
5.5.240.0270.06320.25
5.4.450.0630.05319.48
5.4.440.0470.04019.48
5.4.430.0430.04719.40
5.4.420.0300.05019.63
5.4.410.0130.05019.43
5.4.400.0100.05019.10
5.4.390.0030.06019.11
5.4.380.0100.05319.09
5.4.370.0170.04719.06
5.4.360.0100.05319.13
5.4.350.0040.04112.04
5.4.340.0080.03412.04
5.4.320.0050.03812.52
5.4.310.0090.04412.52
5.4.300.0110.04012.53
5.4.290.0090.04612.52
5.4.280.0070.03812.42
5.4.270.0060.03812.42
5.4.260.0080.03912.42
5.4.250.0100.03512.42
5.4.240.0090.03812.42
5.4.230.0070.04412.41
5.4.220.0090.03612.41
5.4.210.0070.03812.41
5.4.200.0120.04112.41
5.4.190.0140.03712.41
5.4.180.0090.03712.41
5.4.170.0120.03712.41
5.4.160.0100.05512.41
5.4.150.0100.04612.41
5.4.140.0120.04112.09
5.4.130.0070.04212.08
5.4.120.0060.03712.04
5.4.110.0080.03712.03
5.4.100.0090.04912.03
5.4.90.0180.07212.03
5.4.80.0120.04612.03
5.4.70.0120.04712.03
5.4.60.0150.04112.03
5.4.50.0080.04112.03
5.4.40.0100.05212.02
5.4.30.0090.04812.01
5.4.20.0170.06412.02
5.4.10.0160.03712.02
5.4.00.0090.04411.51
5.3.290.0130.04112.80
5.3.280.0100.04112.71
5.3.270.0110.04312.73
5.3.260.0190.05612.72
5.3.250.0150.05512.72
5.3.240.0130.05712.72
5.3.230.0160.03912.70
5.3.220.0140.04312.68
5.3.210.0100.04212.68
5.3.200.0130.04212.68
5.3.190.0080.04612.67
5.3.180.0090.04612.68
5.3.170.0100.04812.67
5.3.160.0060.04412.67
5.3.150.0110.03812.67
5.3.140.0080.05412.66
5.3.130.0130.07112.65
5.3.120.0140.04712.66
5.3.110.0120.04212.66
5.3.100.0060.03812.14
5.3.90.0110.03512.13
5.3.80.0110.03712.11
5.3.70.0170.05212.12
5.3.60.0210.05612.10
5.3.50.0150.07512.05
5.3.40.0110.04612.05
5.3.30.0120.04912.01
5.3.20.0080.04911.79
5.3.10.0140.04711.75
5.3.00.0120.05011.74
5.2.170.0220.0649.25
5.2.160.0110.0339.24
5.2.150.0030.0359.24
5.2.140.0040.0369.24
5.2.130.0050.0309.20
5.2.120.0090.0289.20
5.2.110.0090.0279.21
5.2.100.0100.0409.20
5.2.90.0040.0329.20
5.2.80.0040.0329.20
5.2.70.0130.0349.20
5.2.60.0110.0289.15
5.2.50.0070.0409.12
5.2.40.0090.0279.10
5.2.30.0100.0279.07
5.2.20.0080.0399.06
5.2.10.0060.0378.97
5.2.00.0100.0318.84
5.1.60.0060.0288.11
5.1.50.0060.0288.12
5.1.40.0130.0448.09
5.1.30.0030.0288.45
5.1.20.0090.0278.46
5.1.10.0060.0288.19
5.1.00.0100.0278.19
5.0.50.0100.0416.68
5.0.40.0070.0276.54
5.0.30.0090.0306.36
5.0.20.0050.0206.32
5.0.10.0050.0206.30
5.0.00.0080.0316.30
4.4.90.0040.0224.78
4.4.80.0030.0304.75
4.4.70.0040.0154.75
4.4.60.0040.0164.76
4.4.50.0040.0164.77
4.4.40.0040.0264.71
4.4.30.0040.0174.76
4.4.20.0030.0184.85
4.4.10.0020.0194.84
4.4.00.0050.0264.76
4.3.110.0040.0204.67
4.3.100.0050.0174.67
4.3.90.0070.0134.63
4.3.80.0060.0264.58
4.3.70.0060.0174.63
4.3.60.0070.0164.63
4.3.50.0050.0184.62
4.3.40.0030.0274.54
4.3.30.0020.0173.34
4.3.20.0010.0183.33
4.3.10.0040.0193.28
4.3.00.0030.01713.38

preferences:
48.27 ms | 401 KiB | 5 Q