3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<EOD Example of string spanning multiple lines using heredoc syntax. EOD; /* More complex example, with variables. */ class foo { var $foo; var $bar; function foo() { $this->foo = 'Foo'; $this->bar = array('Bar1', 'Bar2', 'Bar3'); } } $foo = new foo(); $name = 'MyName'; function printss(){ echo <<<EOT My name is "$name". I am printing some $foo->foo. Now, I am printing some {$foo->bar[1]}. This should print a capital 'A': \x41 EOT; } function main(){ $idx = 100; while($idx){ $idx--; printss(); } } main(); ?>

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.0100.00718.68
8.3.50.0090.01022.06
8.3.40.0130.00619.02
8.3.30.0040.01219.22
8.3.20.0040.00420.22
8.3.10.0030.00523.65
8.3.00.0090.00317.63
8.2.180.0100.00616.38
8.2.170.0130.01022.96
8.2.160.0030.01020.38
8.2.150.0050.00324.18
8.2.140.0000.00924.66
8.2.130.0000.00826.16
8.2.120.0040.00422.09
8.2.110.0070.00422.21
8.2.100.0060.00618.03
8.2.90.0050.00317.81
8.2.80.0030.00619.15
8.2.70.0000.00817.75
8.2.60.0030.00617.75
8.2.50.0070.00318.07
8.2.40.0090.00019.89
8.2.30.0040.00418.22
8.2.20.0030.00617.87
8.2.10.0050.00318.19
8.2.00.0050.00517.79
8.1.280.0170.00325.92
8.1.270.0030.00622.21
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.17
8.1.230.0090.00320.93
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0050.00517.22
8.1.190.0080.00017.23
8.1.180.0000.00818.10
8.1.170.0050.00318.49
8.1.160.0040.00422.05
8.1.150.0050.00218.82
8.1.140.0000.00717.44
8.1.130.0000.00717.72
8.1.120.0040.00417.34
8.1.110.0050.00317.30
8.1.100.0040.00417.47
8.1.90.0040.00417.29
8.1.80.0040.00417.30
8.1.70.0040.00417.38
8.1.60.0060.00317.54
8.1.50.0000.00817.54
8.1.40.0030.00617.56
8.1.30.0040.00417.63
8.1.20.0030.00617.68
8.1.10.0000.00817.54
8.1.00.0040.00417.49
8.0.300.0040.00420.13
8.0.290.0000.00816.75
8.0.280.0080.00018.31
8.0.270.0000.00817.18
8.0.260.0000.00617.28
8.0.250.0080.00016.92
8.0.240.0060.00016.89
8.0.230.0030.00317.02
8.0.220.0030.00516.87
8.0.210.0000.00716.93
8.0.200.0000.00716.88
8.0.190.0000.00817.00
8.0.180.0030.00516.98
8.0.170.0040.00416.88
8.0.160.0040.00416.82
8.0.150.0070.00316.94
8.0.140.0050.00316.93
8.0.130.0040.00713.42
8.0.120.0000.00816.86
8.0.110.0090.00016.95
8.0.100.0030.00616.86
8.0.90.0040.00416.84
8.0.80.0120.00616.89
8.0.70.0040.00416.96
8.0.60.0040.00416.83
8.0.50.0000.00716.88
8.0.30.0180.00616.91
8.0.20.0160.00717.40
8.0.10.0030.00316.96
8.0.00.0140.00716.74
7.4.330.0000.00515.03
7.4.320.0030.00316.42
7.4.300.0000.00616.37
7.4.290.0000.00716.61
7.4.280.0070.00016.39
7.4.270.0030.00316.51
7.4.260.0050.00316.45
7.4.250.0060.00316.55
7.4.240.0030.00516.55
7.4.230.0070.00016.40
7.4.220.0090.01016.33
7.4.210.0070.00716.68
7.4.200.0000.00716.46
7.4.160.0130.00716.47
7.4.150.0190.00817.40
7.4.140.0070.01417.86
7.4.130.0070.01416.43
7.4.120.0130.00916.52
7.4.110.0170.00316.46
7.4.100.0120.01216.39
7.4.90.0150.00616.49
7.4.80.0190.00019.39
7.4.70.0160.00616.62
7.4.60.0060.01416.59
7.4.50.0000.00916.26
7.4.40.0090.01216.58
7.4.30.0080.01216.74
7.4.00.0030.01314.76
7.3.330.0000.00513.50
7.3.320.0050.00013.42
7.3.310.0000.00816.34
7.3.300.0000.00716.30
7.3.290.0090.00616.39
7.3.280.0080.01016.37
7.3.270.0100.01617.40
7.3.260.0030.01616.65
7.3.250.0110.01016.52
7.3.240.0080.01216.58
7.3.230.0160.00616.52
7.3.210.0100.01316.54
7.3.200.0090.01519.39
7.3.190.0100.01016.41
7.3.180.0100.01016.40
7.3.170.0070.01116.55
7.3.160.0060.01216.61
7.2.330.0140.00716.78
7.2.320.0110.00716.82
7.2.310.0070.01116.79
7.2.300.0120.00616.45
7.2.290.0110.01116.54
7.2.60.0070.01016.77
7.2.00.0060.00919.63
7.1.200.0070.00515.66
7.1.100.0000.01217.88
7.1.70.0030.00516.92
7.1.60.0070.01719.32
7.1.50.0030.01316.82
7.1.00.0070.07322.30
7.0.200.0030.00616.93
7.0.140.0070.07022.21
7.0.60.0000.08719.80
7.0.50.0030.04317.92
7.0.40.0070.04019.93
7.0.30.0270.05019.92
7.0.20.0300.06719.89
7.0.10.0170.04020.24
7.0.00.0100.06720.28
5.6.280.0030.07320.96
5.6.210.0030.05020.73
5.6.200.0030.08718.29
5.6.190.0130.07720.41
5.6.180.0170.06320.45
5.6.170.0370.07320.57
5.6.160.0070.03720.40
5.6.150.0170.06718.23
5.6.140.0000.05018.19
5.6.130.0030.05018.17
5.6.120.0000.04321.00
5.6.110.0170.08321.12
5.6.100.0070.08021.03
5.6.90.0100.08020.98
5.6.80.0100.05020.53
5.6.70.2470.05320.52
5.5.350.0000.03320.45
5.5.340.0100.07318.09
5.5.330.0070.08020.14
5.5.320.0070.06020.36
5.5.310.0270.05320.25
5.5.300.0030.07017.93
5.5.290.0070.08017.93
5.5.280.0030.04720.81
5.5.270.0070.05320.78
5.5.260.0130.07320.82
5.5.250.0270.06720.69
5.5.240.0030.09020.25
5.4.450.4170.05019.22
5.4.440.3700.04019.49
5.4.430.0100.04319.32
5.4.420.0200.04719.54
5.4.410.0170.07019.13
5.4.400.0270.07319.07
5.4.390.4300.04319.07
5.4.380.0130.04019.24
5.4.370.0230.07319.04
5.4.360.0470.04018.77
5.4.350.0200.04319.00
5.4.340.0070.03712.04
5.4.320.0110.03212.51
5.4.310.0070.04212.50
5.4.300.0080.04512.51
5.4.290.0070.03812.51
5.4.280.0040.03812.40
5.4.270.0060.03612.40
5.4.260.0100.03312.40
5.4.250.0080.04812.40
5.4.240.0060.03812.40
5.4.230.0100.03512.39
5.4.220.0070.03512.39
5.4.210.0080.03412.40
5.4.200.0080.04712.39
5.4.190.0090.03712.39
5.4.180.0110.04212.39
5.4.170.0050.04012.40
5.4.160.0060.03712.39
5.4.150.0050.04012.39
5.4.140.0060.04412.07
5.4.130.0060.04112.07
5.4.120.0080.04312.02
5.4.110.0130.04112.02
5.4.100.0090.03312.02
5.4.90.0080.04312.02
5.4.80.0080.05112.02
5.4.70.0130.03712.02
5.4.60.0060.04412.02
5.4.50.0090.05512.01
5.4.40.0080.03512.00
5.4.30.0090.03312.00
5.4.20.0060.04312.00
5.4.10.0080.03712.00
5.4.00.3630.03715.94

preferences:
41.48 ms | 401 KiB | 5 Q