3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'bar'; public $baz = 'baz'; } class FooHack extends Foo { public function __construct(Foo $wrapped) { unset($this->bar); } } $foo = new FooHack(new Foo); $reflectionFooBar = new \ReflectionProperty(Foo::class, 'bar'); var_dump((new ReflectionClass(Foo::class))->getProperties()); var_dump($reflectionFooBar->getValue($foo)); var_dump( property_exists(FooHack::class, 'bar'), property_exists($foo, 'bar') );

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.4.120.0150.00623.91
8.4.110.0040.00522.55
8.4.100.0150.00717.88
8.4.90.0100.01118.94
8.4.80.0120.00818.04
8.4.70.0080.01118.20
8.4.60.0070.00119.15
8.4.50.0110.00518.58
8.4.40.0140.00719.48
8.4.30.0100.01019.64
8.4.20.0110.00717.87
8.4.10.0060.00319.44
8.3.250.0040.01118.68
8.3.240.0050.00416.82
8.3.230.0120.00716.49
8.3.220.0050.00317.36
8.3.210.0100.00518.35
8.3.200.0040.00516.68
8.3.190.0040.00517.04
8.3.180.0040.00516.50
8.3.170.0070.01120.38
8.3.160.0070.01117.42
8.3.150.0150.00316.95
8.3.140.0100.01016.43
8.3.130.0040.00418.63
8.3.120.0030.00620.70
8.3.110.0040.00418.61
8.3.100.0030.00524.06
8.3.90.0160.00326.77
8.3.80.0030.00618.30
8.3.70.0110.01118.43
8.3.60.0060.01516.49
8.3.50.0140.00822.12
8.3.40.0110.00418.54
8.3.30.0070.01118.52
8.3.20.0000.00818.75
8.3.10.0050.00321.73
8.3.00.0040.00419.38
8.2.290.0120.00720.22
8.2.280.0070.00318.55
8.2.270.0030.00617.24
8.2.260.0110.00716.84
8.2.250.0000.00819.02
8.2.240.0060.00318.84
8.2.230.0030.00620.94
8.2.220.0090.00037.54
8.2.210.0080.00026.77
8.2.200.0060.01217.00
8.2.190.0000.01516.75
8.2.180.0100.00716.56
8.2.170.0060.01222.96
8.2.160.0070.00719.25
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0000.00717.87
8.2.120.0070.00026.35
8.2.110.0050.00522.25
8.2.100.0120.00017.68
8.2.90.0030.00517.63
8.2.80.0040.00417.97
8.2.70.0040.00417.93
8.2.60.0000.00718.16
8.2.50.0060.00318.10
8.2.40.0040.00420.47
8.2.30.0040.00419.12
8.2.20.0030.00517.95
8.2.10.0040.00418.02
8.2.00.0070.00017.62
8.1.330.0110.00821.87
8.1.320.0120.00816.30
8.1.310.0100.00718.33
8.1.300.0050.00516.19
8.1.290.0090.00030.84
8.1.280.0120.00325.92
8.1.270.0100.01020.41
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0040.00817.21
8.1.230.0110.00019.54
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0050.00320.75
8.1.160.0040.00418.76
8.1.150.0040.00422.09
8.1.140.0000.00719.52
8.1.130.0030.00319.03
8.1.120.0040.00417.32
8.1.110.0040.00417.47
8.1.100.0000.00717.48
8.1.90.0040.00417.38
8.1.80.0000.00717.32
8.1.70.0000.00717.32
8.1.60.0000.00717.49
8.1.50.0000.00817.51
8.1.40.0040.00417.46
8.1.30.0040.00417.60
8.1.20.0040.00417.54
8.1.10.0030.00517.46
8.1.00.0090.00017.45
8.0.300.0000.00818.77
8.0.290.0060.00316.75
8.0.280.0000.00718.39
8.0.270.0070.00016.88
8.0.260.0030.00317.16
8.0.250.0000.00717.00
8.0.240.0050.00216.89
8.0.230.0030.00517.03
8.0.220.0030.00316.90
8.0.210.0070.00016.90
8.0.200.0000.00716.97
8.0.190.0070.00016.85
8.0.180.0040.00416.86
8.0.170.0000.00816.82
8.0.160.0000.00716.91
8.0.150.0050.00216.86
8.0.140.0000.00716.76
8.0.130.0050.00013.38
8.0.120.0040.00416.84
8.0.110.0070.00016.96
8.0.100.0030.00516.88
8.0.90.0040.00416.87
8.0.80.0100.00616.80
8.0.70.0000.00816.82
8.0.60.0030.00516.74
8.0.50.0000.00716.89
8.0.30.0110.00616.90
8.0.20.0110.00917.40
8.0.10.0040.00417.02
8.0.00.0030.01516.78
7.4.330.0000.00615.55
7.4.320.0000.00616.45
7.4.300.0030.00316.54
7.4.290.0030.00316.50
7.4.280.0000.00816.63
7.4.270.0000.00716.43
7.4.260.0000.00816.46
7.4.250.0040.00416.52
7.4.240.0070.00016.53
7.4.230.0030.00316.42
7.4.220.0090.01216.64
7.4.210.0080.00716.64
7.4.200.0000.00816.66
7.4.160.0130.00316.55
7.4.150.0000.01917.40
7.4.140.0170.01317.86
7.4.130.0110.00816.60
7.4.120.0090.01116.54
7.4.110.0090.00916.49
7.4.100.0080.01616.45
7.4.90.0070.01016.50
7.4.80.0100.01319.39
7.4.70.0060.01116.65
7.4.60.0070.01116.55
7.4.50.0040.00716.77
7.4.40.0100.00716.55
7.4.30.0090.00816.56
7.4.00.0030.01314.97
7.3.330.0060.00013.16
7.3.320.0000.00513.14
7.3.310.0030.00316.32
7.3.300.0050.00216.26
7.3.290.0070.00016.37
7.3.280.0080.00816.32
7.3.270.0160.00617.40
7.3.260.0120.00716.35
7.3.250.0070.01316.50
7.3.240.0090.01116.35
7.3.230.0130.00616.35
7.3.210.0120.00616.53
7.3.200.0090.01219.39
7.3.190.0100.00716.38
7.3.180.0100.00616.38
7.3.170.0070.01016.38
7.3.160.0120.00616.50
7.2.330.0000.01716.68
7.2.320.0090.00916.34
7.2.310.0130.00316.39
7.2.300.0130.00616.57
7.2.290.0100.01016.74
7.2.60.0030.01416.79
7.2.00.0040.00819.45
7.1.200.0070.00715.79
7.1.100.0030.00717.97
7.1.70.0040.00416.87
7.1.60.0090.00317.25
7.1.50.0070.00316.59
7.1.40.0060.01216.47
7.1.30.0060.01316.65
7.1.20.0080.00316.77
7.1.10.0000.00816.70
7.1.00.0000.00816.63
7.0.200.0040.00416.84
7.0.190.0030.00616.65
7.0.180.0000.01016.34
7.0.170.0030.00716.26
7.0.160.0000.00816.06
7.0.150.0090.00316.34
7.0.140.0000.00816.26
7.0.130.0000.00916.63
7.0.120.0000.00716.53
7.0.110.0000.00816.41
7.0.100.0000.00816.34
7.0.90.0000.00816.27
7.0.80.0030.00516.20
7.0.70.0000.00716.41
7.0.60.0080.00015.92
7.0.50.0040.00416.18
7.0.40.0030.00515.46
7.0.30.0040.00415.46
7.0.20.0080.00615.46
7.0.10.0070.01115.46
7.0.00.0000.01115.46
5.6.300.0100.05420.83
5.6.290.0030.03920.87
5.6.280.0070.04020.92
5.6.270.0030.04121.08
5.6.260.0000.04321.08
5.6.250.0000.04620.84
5.6.240.0000.04720.91
5.6.230.0000.04720.96
5.6.220.0030.04120.80
5.6.210.0030.04420.80
5.6.200.0130.03821.00
5.6.190.0000.04721.00
5.6.180.0000.04521.00
5.6.170.0140.06920.83
5.6.160.0000.05721.06
5.6.150.0030.06320.84
5.6.140.0000.05120.98
5.6.130.0100.05020.99
5.6.120.0150.05820.78
5.6.110.0070.06620.83
5.6.100.0120.07620.91
5.6.90.0130.07920.95
5.6.80.0070.06920.24
5.6.70.0070.07520.20
5.6.60.0000.04320.21
5.6.50.0030.06920.42
5.6.40.0070.05620.20
5.6.30.0030.04220.10
5.6.20.0030.04020.35
5.6.10.0030.03920.19
5.6.00.0060.03820.37

preferences:
29.5 ms | 403 KiB | 5 Q