3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $var; } class B extends A { } $ro = new ReflectionObject(new A()); echo $ro->hasProperty('var') ? 'true' : 'false', "\n"; // returns true echo $ro->getProperty('var'), "\n"; // prints property $ro = new ReflectionObject(new B()); echo $ro->hasProperty('var') ? 'true' : 'false', "\n"; // returns true echo $ro->getProperty('var'), "\n"; // throws exception

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.1rc30.0010.00716.89
8.1rc20.0000.00817.13
8.1rc10.0050.00317.02
8.0.130.0030.00313.28
8.0.120.0050.00316.84
8.0.110.0050.00316.94
8.0.100.0050.00216.98
8.0.90.0000.00716.91
8.0.80.0120.00916.87
8.0.70.0070.00016.81
8.0.60.0000.00716.80
8.0.50.0030.00616.88
8.0.30.0090.01117.00
8.0.20.0170.00717.40
8.0.10.0040.00416.87
8.0.00.0080.01316.82
7.4.260.0090.00316.60
7.4.250.0000.00716.61
7.4.240.0030.00316.64
7.4.230.0030.00316.73
7.4.220.0090.01316.58
7.4.210.0060.00916.54
7.4.200.0070.00016.42
7.4.160.0040.01216.64
7.4.150.0150.00417.40
7.4.140.0110.00617.86
7.4.130.0090.01116.45
7.4.120.0110.00616.56
7.4.110.0080.01116.46
7.4.100.0110.00716.73
7.4.90.0090.00916.48
7.4.80.0070.01019.39
7.4.70.0090.00916.51
7.4.60.0090.01016.37
7.4.50.0060.00316.50
7.4.40.0110.00516.50
7.4.30.0080.00816.41
7.4.00.0090.00614.86
7.3.330.0030.00313.18
7.3.320.0030.00313.24
7.3.310.0000.00616.20
7.3.300.0030.00316.22
7.3.290.0080.00716.32
7.3.280.0060.00916.30
7.3.270.0090.01517.40
7.3.260.0120.00616.53
7.3.250.0100.01016.43
7.3.240.0050.01416.50
7.3.230.0060.01616.39
7.3.210.0100.01516.24
7.3.200.0070.01219.39
7.3.190.0050.01416.38
7.3.180.0110.00616.41
7.3.170.0170.00616.32
7.3.160.0120.00416.35
7.3.10.0060.00616.59
7.3.00.0080.00016.38
7.2.330.0110.00716.36
7.2.320.0100.00616.68
7.2.310.0040.01416.81
7.2.300.0130.00316.53
7.2.290.0140.01216.72
7.2.130.0000.01116.70
7.2.120.0100.00316.89
7.2.110.0060.00916.78
7.2.100.0000.01116.64
7.2.90.0060.00916.81
7.2.80.0100.00316.77
7.2.70.0070.00717.09
7.2.60.0050.00816.87
7.2.50.0100.00316.84
7.2.40.0040.01116.96
7.2.30.0030.01016.97
7.2.20.0060.00616.93
7.2.10.0080.00616.92
7.2.00.0030.01017.03
7.1.250.0060.00315.64
7.1.200.0070.00715.37
7.1.70.0100.00016.71
7.1.60.0130.00719.22
7.1.50.0030.01716.54
7.1.00.0100.07022.30
7.0.200.0050.00216.61
7.0.140.0070.02722.10
7.0.60.0130.07320.02
7.0.50.0030.07717.85
7.0.40.0070.05020.17
7.0.30.0170.04320.11
7.0.20.0430.06720.25
7.0.10.0000.04720.06
7.0.00.0100.08720.15
5.6.210.0070.07720.52
5.6.200.0100.07018.20
5.6.190.0070.04720.56
5.6.180.0230.05320.48
5.6.170.0400.06720.62
5.6.160.0100.07020.48
5.6.150.0070.05018.21
5.6.140.0030.04718.12
5.6.130.0100.06318.23
5.6.120.0070.04321.09
5.6.110.0070.08320.89
5.6.100.0030.04720.95
5.6.90.0030.05020.95
5.6.80.0070.03720.41
5.5.350.0200.05720.45
5.5.340.0030.08317.95
5.5.330.0070.03720.27
5.5.320.0270.07720.25
5.5.310.0330.06020.27
5.5.300.0030.08017.96
5.5.290.0130.07718.02
5.5.280.0030.04020.80
5.5.270.0070.06320.76
5.5.260.0070.05020.87
5.5.250.0100.06320.69
5.5.240.0070.03320.35
5.4.450.0400.04719.71
5.4.440.0630.07719.54
5.4.430.0130.06019.29
5.4.420.0130.06019.58
5.4.410.0230.04719.30
5.4.400.0200.05319.35
5.4.390.0130.05719.16
5.4.380.0200.05018.79
5.4.370.0200.05018.53
5.4.360.0130.05318.48
5.4.350.0170.05018.62
5.4.340.0130.06018.54
5.4.320.0100.06018.61
5.4.310.0130.05318.74
5.4.300.0130.05718.76
5.4.290.0130.05318.56
5.4.280.0200.05018.61
5.4.270.0070.06018.82
5.4.260.0270.04718.77
5.4.250.0100.06318.83
5.4.240.0130.06018.85
5.4.230.0130.06018.60
5.4.220.0130.05718.75
5.4.210.0100.06018.71
5.4.200.0170.05016.80
5.4.190.0130.05718.56
5.4.180.0170.05318.68
5.4.170.0100.06318.68
5.4.160.0270.05018.48
5.4.150.0200.05018.72
5.4.140.0200.05016.29
5.4.130.0270.06016.17
5.4.120.0170.05016.29
5.4.110.0230.04316.28
5.4.100.0170.05316.31
5.4.90.0200.05316.45
5.4.80.0200.05016.24
5.4.70.0170.05016.27
5.4.60.0130.05316.25
5.4.50.0230.04016.23
5.4.40.0270.04016.14
5.4.30.0200.04716.42
5.4.20.0270.04716.25
5.4.10.0200.06316.24
5.4.00.0230.06015.68
5.3.290.0270.06714.65
5.3.280.0300.05714.64
5.3.270.0200.07314.83
5.3.260.0200.06714.71
5.3.250.0200.05014.59
5.3.240.0170.05014.83
5.3.230.0130.05314.82
5.3.220.0330.03314.75
5.3.210.0170.05314.67
5.3.200.0170.05314.51
5.3.190.0300.04014.70
5.3.180.0070.06314.79
5.3.170.0070.05714.62
5.3.160.0200.05014.73
5.3.150.0170.05714.74
5.3.140.0100.05714.55
5.3.130.0170.05314.77
5.3.120.0100.06014.55
5.3.110.0100.06014.73
5.3.100.0230.06314.17
5.3.90.0170.07014.14
5.3.80.0130.07014.09
5.3.70.0370.05014.06
5.3.60.0270.06014.13
5.3.50.0130.07014.08
5.3.40.0300.05314.02
5.3.30.0200.04714.04
5.3.20.0170.05013.86
5.3.10.0270.04013.79
5.3.00.0170.06713.88
5.2.170.0100.04711.24
5.2.160.0170.04011.20
5.2.150.0070.07011.14
5.2.140.0170.05011.20
5.2.130.0100.04711.32
5.2.120.0070.05311.21
5.2.110.0200.04011.13
5.2.100.0170.04711.14
5.2.90.0170.04311.21
5.2.80.0230.04711.13
5.2.70.0200.04311.09
5.2.60.0170.04711.07
5.2.50.0200.04311.12
5.2.40.0100.04711.03
5.2.30.0100.05010.95
5.2.20.0100.04310.99
5.2.10.0030.05010.91
5.2.00.0130.04010.76
5.1.60.0100.03310.11
5.1.50.0070.04010.20
5.1.40.0170.03010.00
5.1.30.0100.03710.54
5.1.20.0200.03010.57
5.1.10.0070.04010.18
5.1.00.0130.03710.25
5.0.50.0100.0278.53
5.0.40.0070.0308.52
5.0.30.0070.0438.26
5.0.20.0030.0308.32
5.0.10.0100.0278.28
5.0.00.0070.0438.18
4.4.90.0070.0236.79
4.4.80.0130.0176.79
4.4.70.0070.0236.79
4.4.60.0070.0206.79
4.4.50.0070.0206.79
4.4.40.0070.0376.79
4.4.30.0000.0276.79
4.4.20.0030.0236.79
4.4.10.0030.0236.79
4.4.00.0000.0406.79
4.3.110.0070.0236.79
4.3.100.0070.0206.79
4.3.90.0030.0236.79
4.3.80.0070.0336.79
4.3.70.0030.0236.79
4.3.60.0100.0176.79
4.3.50.0100.0176.79
4.3.40.0070.0336.79
4.3.30.0030.0236.79
4.3.20.0070.0206.79
4.3.10.0030.0236.79
4.3.00.0070.0207.59

preferences:
13.64 ms | 455 KiB | 5 Q