3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zero = 0; // global scope $f1 = function() use ($zero) { $one = 1; // third-level closure scope of f4 $f2 = function() use ($zero, $one) { $two = 2; // second-level closure scope of f4 $f3 = function() use ($zero, $one, $two) { $three = 3; // first-level closure scope of f4 // $f4 = function() use ($zero, $one, $two, $three) { // $four = 4; // local scope of f4 // echo $zero + $one + $two + $three + $four; // } } } } $f4();

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)
5.4.340.0080.04612.04
5.4.320.0090.03612.52
5.4.310.0080.04212.52
5.4.300.0120.04212.53
5.4.290.0160.04212.52
5.4.280.0060.04412.42
5.4.270.0020.04112.42
5.4.260.0050.03912.42
5.4.250.0070.03912.42
5.4.240.0130.03612.42
5.4.230.0040.04312.41
5.4.220.0050.04112.41
5.4.210.0050.03912.41
5.4.200.0100.04712.41
5.4.190.0110.05612.41
5.4.180.0120.05112.41
5.4.170.0140.06812.41
5.4.160.0080.05312.41
5.4.150.0120.05612.41
5.4.140.0140.05612.10
5.4.130.0110.05512.07
5.4.120.0140.03812.04
5.4.110.0090.04512.04
5.4.100.0210.04612.04
5.4.90.0070.05312.04
5.4.80.0060.04512.04
5.4.70.0060.03712.04
5.4.60.0150.04412.04
5.4.50.0080.03612.03
5.4.40.0070.03712.02
5.4.30.0060.04412.02
5.4.20.0120.03312.02
5.4.10.0110.03212.02
5.4.00.0070.04111.51
5.3.290.0070.04412.80
5.3.280.0080.04312.71
5.3.270.0080.04012.72
5.3.260.0050.05412.72
5.3.250.0060.04312.72
5.3.240.0050.04012.72
5.3.230.0110.04712.71
5.3.220.0100.05412.62
5.3.210.0120.05412.68
5.3.200.0130.05112.68
5.3.190.0090.04212.68
5.3.180.0050.04512.67
5.3.170.0130.03212.67
5.3.160.0140.04112.67
5.3.150.0130.05212.68
5.3.140.0050.04212.66
5.3.130.0080.04012.66
5.3.120.0070.04112.66
5.3.110.0080.04112.66
5.3.100.0070.04612.13
5.3.90.0100.05012.11
5.3.80.0070.03812.11
5.3.70.0160.04212.11
5.3.60.0050.03812.09
5.3.50.0050.03812.04
5.3.40.0160.04512.04
5.3.30.0090.04412.00
5.3.20.0080.03511.78
5.3.10.0100.03911.74
5.3.00.0080.03811.73
5.2.170.0070.0479.18
5.2.160.0060.0359.18
5.2.150.0130.0449.18
5.2.140.0060.0369.18
5.2.130.0040.0309.14
5.2.120.0040.0329.14
5.2.110.0100.0389.14
5.2.100.0100.0379.14
5.2.90.0070.0439.14
5.2.80.0050.0389.14
5.2.70.0060.0359.14
5.2.60.0050.0379.09
5.2.50.0070.0429.06
5.2.40.0100.0299.04
5.2.30.0060.0409.01
5.2.20.0080.0389.00
5.2.10.0080.0308.93
5.2.00.0040.0308.78
5.1.60.0030.0268.07
5.1.50.0060.0258.06
5.1.40.0080.0328.05
5.1.30.0050.0388.40
5.1.20.0080.0378.42
5.1.10.0050.0358.14
5.1.00.0040.0358.14
5.0.50.0030.0226.62
5.0.40.0080.0226.48
5.0.30.0030.0376.29
5.0.20.0080.0246.26
5.0.10.0050.0306.24
5.0.00.0070.0526.23
4.4.90.0070.0184.78
4.4.80.0050.0214.75
4.4.70.0050.0224.75
4.4.60.0030.0214.75
4.4.50.0080.0184.77
4.4.40.0090.0294.71
4.4.30.0020.0204.76
4.4.20.0040.0164.84
4.4.10.0040.0164.85
4.4.00.0030.0254.75
4.3.110.0030.0204.67
4.3.100.0040.0154.67
4.3.90.0030.0154.64
4.3.80.0030.0344.58
4.3.70.0060.0144.63
4.3.60.0060.0194.63
4.3.50.0100.0204.63
4.3.40.0440.0234.54
4.3.30.0200.0223.29
4.3.20.0200.0213.26
4.3.10.0110.0183.22
4.3.00.0000.0237.16

preferences:
140.26 ms | 1398 KiB | 7 Q