3v4l.org

run code in 300+ PHP versions simultaneously
<?php phpversion() >= "7.0.0" or die(); class FooBar { private $x; public function __construct() { var_dump($this); echo "Let's remove a property!", PHP_EOL; unset($this->x); var_dump($this); var_dump(property_exists($this, 'x')); echo "Let's add a property!", PHP_EOL; $this->x = 2; var_dump($this); echo "Where did the private come from?", PHP_EOL; } } $foobar = new Foobar;

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.0060.01316.54
7.4.00.0030.01316.50
7.3.130.0100.00716.30
7.3.120.0030.01316.29
7.3.110.0030.01016.38
7.3.100.0070.01016.16
7.3.90.0110.00416.32
7.3.80.0030.00916.13
7.3.70.0090.00316.24
7.3.60.0100.00716.23
7.3.50.0060.00616.32
7.3.40.0060.01216.25
7.3.30.0060.00616.43
7.3.20.0090.00318.15
7.3.10.0030.01217.33
7.3.00.0030.01117.41
7.2.260.0140.00716.66
7.2.250.0040.01516.77
7.2.240.0090.00616.77
7.2.230.0120.00616.73
7.2.220.0030.01216.49
7.2.210.0030.00816.66
7.2.200.0050.00516.79
7.2.190.0140.00316.55
7.2.180.0060.00616.52
7.2.170.0100.00316.64
7.2.160.0070.01116.71
7.2.150.0030.01218.27
7.2.140.0080.00518.46
7.2.130.0070.00717.69
7.2.120.0100.00317.71
7.2.110.0050.01017.75
7.2.100.0080.01017.68
7.2.90.0050.00717.56
7.2.80.0020.01317.66
7.2.70.0030.01217.61
7.2.60.0060.00917.48
7.2.50.0030.01317.73
7.2.40.0070.00817.66
7.2.30.0060.00517.65
7.2.20.0050.01017.59
7.2.10.0080.00817.69
7.2.00.0100.00418.26
7.1.330.0080.00817.23
7.1.320.0000.01317.16
7.1.310.0030.00617.35
7.1.300.0040.01117.39
7.1.290.0090.00317.22
7.1.280.0130.00017.30
7.1.270.0030.01217.38
7.1.260.0110.00017.17
7.1.250.0080.00516.54
7.1.240.0050.01016.50
7.1.230.0080.00816.57
7.1.220.0050.00816.29
7.1.210.0000.01016.52
7.1.200.0080.00516.20
7.1.190.0050.01016.48
7.1.180.0020.01216.47
7.1.170.0000.01416.52
7.1.160.0020.01116.49
7.1.150.0090.00416.42
7.1.140.0050.00916.46
7.1.130.0090.00716.51
7.1.120.0070.00716.56
7.1.110.0020.01116.59
7.1.100.0050.00917.01
7.1.90.0060.00816.54
7.1.80.0050.00816.43
7.1.70.0020.01116.74
7.1.60.0050.01117.40
7.1.50.0030.00916.61
7.1.40.0040.00916.35
7.1.30.0110.00316.43
7.1.20.0070.00516.51
7.1.10.0070.00716.36
7.1.00.0070.02918.44
7.0.330.0040.00916.21
7.0.320.0020.00716.33
7.0.310.0090.00315.97
7.0.300.0020.01016.20
7.0.290.0040.00616.32
7.0.280.0080.00716.12
7.0.270.0070.00516.33
7.0.260.0080.00716.10
7.0.250.0030.00716.25
7.0.240.0050.00816.30
7.0.230.0030.01116.25
7.0.220.0030.00716.14
7.0.210.0030.01216.22
7.0.200.0030.00916.40
7.0.190.0080.00616.27
7.0.180.0030.00916.09
7.0.170.0050.00716.26
7.0.160.0050.00716.32
7.0.150.0030.01016.21
7.0.140.0020.00816.25
7.0.130.0060.00616.32
7.0.120.0070.00816.32
7.0.110.0060.00616.08
7.0.100.0050.00716.30
7.0.90.0040.00616.26
7.0.80.0050.00816.12
7.0.70.0060.00816.31
7.0.60.0150.03017.31
7.0.50.0090.01616.80
7.0.40.0090.03216.20
7.0.30.0130.03116.25
7.0.20.0100.02516.15
7.0.10.0050.02116.20
7.0.00.0030.02116.12
5.6.400.0070.00715.97
5.6.390.0070.00715.67
5.6.380.0050.00615.22
5.6.370.0070.00815.13
5.6.360.0040.00915.03
5.6.350.0000.01414.83
5.6.340.0030.00814.82
5.6.330.0070.00515.21
5.6.320.0030.01015.00
5.6.310.0110.00315.01
5.6.300.0040.01014.91
5.6.290.0030.00915.13
5.6.280.0090.02617.16
5.6.270.0040.01115.06
5.6.260.0040.00815.02
5.6.250.0040.01015.01
5.6.240.0080.00815.00
5.6.230.0080.00814.81
5.6.220.0070.00615.06
5.6.210.0100.01916.91
5.6.200.0050.02816.02
5.6.190.0050.03116.86
5.6.180.0220.02216.83
5.6.170.0100.02216.94
5.6.160.0020.02616.82
5.6.150.0070.02016.04
5.6.140.0060.03316.11
5.6.130.0080.02516.08
5.6.120.0030.02017.08
5.6.110.0060.02416.95
5.6.100.0100.03116.97
5.6.90.0030.02016.91
5.6.80.0080.02516.77
5.6.70.0010.01014.74
5.6.60.0060.00814.94
5.6.50.0040.00914.88
5.6.40.0020.01115.05
5.6.30.0050.00915.06
5.6.20.0050.00814.95
5.6.10.0030.01215.04
5.6.00.0050.00814.92
5.5.380.0030.01013.62
5.5.370.0030.01013.60
5.5.360.0030.01213.52
5.5.350.0100.02815.89
5.5.340.0050.01815.12
5.5.330.0100.02915.89
5.5.320.0020.02615.90
5.5.310.0130.02715.84
5.5.300.0080.02615.06
5.5.290.0050.01915.09
5.5.280.0050.01715.98
5.5.270.0040.03316.04
5.5.260.0020.02116.02
5.5.250.0110.02215.99
5.5.240.0120.02615.86
5.5.230.0020.01113.59
5.5.220.0060.01013.64
5.5.210.0110.00313.67
5.5.200.0050.00913.63
5.5.190.0030.00913.62
5.5.180.0070.00613.71
5.5.170.0040.00813.65
5.5.160.0070.00613.70
5.5.150.0060.00913.63
5.5.140.0060.01113.64
5.5.130.0130.00413.70
5.5.120.0070.00713.62
5.5.110.0070.00813.58
5.5.100.0100.00313.63
5.5.90.0100.00613.53
5.5.80.0090.00613.63
5.5.70.0070.00813.62
5.5.60.0050.00713.64
5.5.50.0090.00713.65
5.5.40.0070.00513.61
5.5.30.0100.00213.63
5.5.20.0080.00613.64
5.5.10.0070.00313.60
5.5.00.0060.00613.60

preferences:
37.68 ms | 400 KiB | 5 Q