3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { private $x = 'b'; } class C extends B { private $x = 'c'; } $obj = new C; $rc = new \ReflectionClass(C::class); $rb = $rc->getParentClass(); $rp_xC = $rc->getProperty('x'); $rp_xB = $rb->getProperty('x'); $rp_xC->setAccessible(true); $xc = $rp_xC->getValue($obj); $rp_xB->setAccessible(true); $xb = $rp_xB->getValue($obj); var_export([$xc, $xb]);

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.0110.00920.47
8.4.110.0100.00918.83
8.4.100.0130.00817.80
8.4.90.0130.00818.63
8.4.80.0100.00817.78
8.4.70.0120.01017.70
8.4.60.0040.00418.88
8.4.50.0090.01120.27
8.4.40.0090.01219.43
8.4.30.0070.01317.58
8.4.20.0100.01019.50
8.4.10.0000.00919.55
8.3.250.0070.00818.91
8.3.240.0180.00316.34
8.3.230.0120.00416.28
8.3.220.0040.00417.20
8.3.210.0100.00816.39
8.3.200.0030.00616.56
8.3.190.0100.00916.95
8.3.180.0060.01218.06
8.3.170.0080.00017.36
8.3.160.0150.00316.34
8.3.150.0040.00417.01
8.3.140.0110.00418.76
8.3.130.0040.00418.35
8.3.120.0030.00618.81
8.3.110.0110.00720.94
8.3.100.0040.00424.06
8.3.90.0130.00626.77
8.3.80.0060.00319.36
8.3.70.0290.00817.75
8.3.60.0090.00618.43
8.3.50.0150.00717.37
8.3.40.0000.01518.67
8.3.30.0160.00018.58
8.3.20.0080.00020.35
8.3.10.0040.00420.28
8.3.00.0040.00423.53
8.2.290.0040.00320.62
8.2.280.0130.00518.20
8.2.270.0080.00016.90
8.2.260.0090.00518.89
8.2.250.0150.00416.85
8.2.240.0050.00317.39
8.2.230.0040.01122.58
8.2.220.0030.00637.54
8.2.210.0000.00826.77
8.2.200.0030.00618.88
8.2.190.0090.00918.31
8.2.180.0140.00018.31
8.2.170.0150.00022.96
8.2.160.0140.00022.26
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00720.34
8.2.120.0070.00026.35
8.2.110.0090.00022.29
8.2.100.0070.00317.84
8.2.90.0000.00822.32
8.2.80.0000.00817.97
8.2.70.0040.00418.03
8.2.60.0040.00418.28
8.2.50.0000.00818.10
8.2.40.0040.00420.42
8.2.30.0070.00019.15
8.2.20.0040.00418.17
8.2.10.0040.00417.96
8.2.00.0070.00018.06
8.1.330.0070.01222.26
8.1.320.0130.00716.44
8.1.310.0030.00518.45
8.1.300.0080.00018.36
8.1.290.0000.00930.84
8.1.280.0130.00325.92
8.1.270.0000.00821.92
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00022.48
8.1.230.0040.00720.87
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0030.00517.36
8.1.190.0000.00816.98
8.1.180.0030.00518.10
8.1.170.0060.00318.57
8.1.160.0000.00718.96
8.1.150.0040.00418.96
8.1.140.0000.00719.14
8.1.130.0000.00718.96
8.1.120.0040.00717.38
8.1.110.0000.00817.50
8.1.100.0000.00917.37
8.1.90.0070.00017.38
8.1.80.0000.00817.52
8.1.70.0040.00417.51
8.1.60.0040.00417.68
8.1.50.0050.00417.39
8.1.40.0040.00417.55
8.1.30.0070.00017.64
8.1.20.0050.00317.68
8.1.10.0040.00417.53
8.1.00.0060.00617.54
8.0.300.0040.00419.98
8.0.290.0030.00616.75
8.0.280.0070.00018.47
8.0.270.0030.00317.29
8.0.260.0030.00316.77
8.0.250.0020.00516.84
8.0.240.0000.00816.98
8.0.230.0030.00316.92
8.0.220.0000.00716.79
8.0.210.0000.00716.89
8.0.200.0000.00716.87
8.0.190.0000.00816.88
8.0.180.0030.00516.88
8.0.170.0000.00716.97
8.0.160.0030.00317.02
8.0.150.0040.00416.87
8.0.140.0050.00216.85
8.0.130.0030.00313.43
8.0.120.0000.00816.90
8.0.110.0050.00316.90
8.0.100.0000.00716.90
8.0.90.0070.00017.04
8.0.80.0040.01216.89
8.0.70.0040.00416.78
8.0.60.0040.00416.81
8.0.50.0000.00716.93
8.0.30.0100.00917.16
8.0.20.0090.01117.40
8.0.10.0000.00717.08
8.0.00.0120.00516.75
7.4.330.0020.00215.55
7.4.320.0060.00016.62
7.4.300.0030.00316.60
7.4.290.0000.00716.45
7.4.280.0030.00616.55
7.4.270.0070.00016.63
7.4.260.0040.00716.58
7.4.250.0070.00016.53
7.4.240.0000.00716.44
7.4.230.0030.00316.70
7.4.220.0090.00816.39
7.4.210.0150.00516.54
7.4.200.0000.00716.38
7.4.160.0080.00716.52
7.4.150.0120.00617.40
7.4.140.0120.00717.86
7.4.130.0030.01616.42
7.4.120.0130.00916.54
7.4.110.0100.00716.55
7.4.100.0070.01016.64
7.4.90.0140.00416.73
7.4.80.0100.00719.39
7.4.70.0070.01116.45
7.4.60.0070.01016.43
7.4.50.0070.01116.49
7.4.40.0100.01016.52
7.4.30.0060.01016.56
7.4.00.0070.01014.84
7.3.330.0050.00013.10
7.3.320.0050.00013.23
7.3.310.0030.00316.30
7.3.300.0000.00716.09
7.3.290.0050.00216.23
7.3.280.0110.00916.21
7.3.270.0090.00917.40
7.3.260.0090.01016.26
7.3.250.0060.01116.18
7.3.240.0100.00916.22
7.3.230.0110.00616.47
7.3.210.0070.01016.32
7.3.200.0030.01316.20
7.3.190.0120.00916.55
7.3.180.0080.01616.39
7.3.170.0030.01216.15
7.3.160.0130.00316.34
7.3.10.0070.00716.46
7.3.00.0100.00616.43
7.2.330.0060.01216.42
7.2.320.0070.01716.52
7.2.310.0060.01016.67
7.2.300.0030.01316.29
7.2.290.0080.00816.64
7.2.130.0000.00817.04
7.2.120.0070.00716.41
7.2.110.0040.00716.75
7.2.100.0070.00716.73
7.2.90.0040.00416.68
7.2.80.0030.00916.65
7.2.70.0070.00316.80
7.2.60.0090.00716.75
7.2.50.0070.01016.37
7.2.40.0070.00716.97
7.2.30.0040.00416.78
7.2.20.0080.00817.02
7.2.10.0000.01316.80
7.2.00.0050.00818.38
7.1.250.0030.00915.91
7.1.200.0030.00715.73
7.1.120.0040.00718.41
7.1.110.0070.00317.79
7.1.100.0000.01018.20
7.1.90.0070.00317.98
7.1.80.0100.00018.33
7.1.70.0030.00617.13
7.1.60.0140.00734.98
7.1.50.0090.01234.89
7.1.40.0110.01134.21
7.1.30.0140.00734.29
7.1.20.0190.01034.52
7.1.10.0000.01016.31
7.1.00.0070.00316.66

preferences:
32.75 ms | 403 KiB | 5 Q