3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * BAR */ class Bar { /** * BAR::$prop */ protected $prop; /** * BAR::method() */ protected function method() { } } /** * FOO */ class Foo extends Bar { /** * FOO::$prop */ protected $prop; /** * FOO::method() */ protected function method() { } } echo "Class:\n"; $reflectionClass = new \ReflectionClass('Foo'); var_dump($reflectionClass->getDocComment()); $reflectionClass = new \ReflectionClass('Bar'); var_dump($reflectionClass->getDocComment()); echo "Property:\n"; $reflectionClass = new \ReflectionProperty('Foo', 'prop'); var_dump($reflectionClass->getDocComment()); $reflectionClass = new \ReflectionProperty('Bar', 'prop'); var_dump($reflectionClass->getDocComment()); echo "Method:\n"; $reflectionClass = new \ReflectionMethod('Foo', 'method'); var_dump($reflectionClass->getDocComment()); $reflectionClass = new \ReflectionMethod('Bar', 'method'); var_dump($reflectionClass->getDocComment());

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.0120.00720.67
8.4.110.0090.01222.41
8.4.100.0130.00717.78
8.4.90.0110.01018.46
8.4.80.0100.01017.77
8.4.70.0100.00618.82
8.4.60.0100.01118.86
8.4.50.0080.00318.61
8.4.40.0150.00319.57
8.4.30.0090.01217.86
8.4.20.0100.01017.49
8.4.10.0060.00317.71
8.3.250.0090.00918.53
8.3.240.0120.00716.49
8.3.230.0100.01116.73
8.3.220.0060.00216.97
8.3.210.0120.00818.48
8.3.200.0060.00616.71
8.3.190.0110.01317.13
8.3.180.0080.01018.69
8.3.170.0160.00316.41
8.3.160.0060.01317.18
8.3.150.0080.01116.91
8.3.140.0050.00318.84
8.3.130.0030.00516.40
8.3.120.0070.00318.88
8.3.110.0040.00420.94
8.3.100.0060.00324.06
8.3.90.0030.01026.77
8.3.80.0090.00016.63
8.3.70.0070.00716.36
8.3.60.0140.00716.50
8.3.50.0130.00521.03
8.3.40.0090.00618.67
8.3.30.0090.00618.77
8.3.20.0000.00818.77
8.3.10.0040.00421.90
8.3.00.0040.00417.68
8.2.290.0110.00620.67
8.2.280.0050.00418.73
8.2.270.0200.00016.70
8.2.260.0120.00316.54
8.2.250.0000.00816.69
8.2.240.0110.00419.03
8.2.230.0040.00422.58
8.2.220.0050.00537.54
8.2.210.0090.00926.77
8.2.200.0060.00318.42
8.2.190.0040.01118.33
8.2.180.0110.00716.75
8.2.170.0040.01122.96
8.2.160.0100.00320.35
8.2.150.0000.00924.18
8.2.140.0090.00024.66
8.2.130.0000.00826.16
8.2.120.0050.00221.00
8.2.110.0070.00320.99
8.2.100.0080.00417.71
8.2.90.0030.00618.02
8.2.80.0030.00617.97
8.2.70.0080.00018.04
8.2.60.0000.00718.22
8.2.50.0000.00918.10
8.2.40.0060.00319.88
8.2.30.0030.00617.89
8.2.20.0000.00817.64
8.2.10.0000.00717.90
8.2.00.0040.00418.12
8.1.330.0090.00923.34
8.1.320.0130.00716.49
8.1.310.0160.00316.02
8.1.300.0050.00519.99
8.1.290.0070.00330.84
8.1.280.0140.00725.92
8.1.270.0060.00323.72
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0040.00720.49
8.1.230.0110.00620.86
8.1.220.0090.00017.74
8.1.210.0050.00318.77
8.1.200.0030.00617.22
8.1.190.0030.00517.11
8.1.180.0040.00418.10
8.1.170.0000.00918.54
8.1.160.0030.00521.94
8.1.150.0050.00218.83
8.1.140.0040.00419.58
8.1.130.0000.00717.70
8.1.120.0050.00317.35
8.1.110.0000.00817.39
8.1.100.0080.00017.42
8.1.90.0040.00417.42
8.1.80.0040.00417.40
8.1.70.0030.00317.41
8.1.60.0000.00817.47
8.1.50.0050.00317.41
8.1.40.0040.00417.37
8.1.30.0030.00517.66
8.1.20.0000.00717.46
8.1.10.0000.00717.50
8.1.00.0040.00417.58
8.0.300.0040.00419.65
8.0.290.0060.00316.72
8.0.280.0050.00318.34
8.0.270.0030.00317.29
8.0.260.0000.00817.29
8.0.250.0030.00316.91
8.0.240.0000.00816.96
8.0.230.0040.00416.95
8.0.220.0000.00716.86
8.0.210.0070.00016.84
8.0.200.0000.00716.88
8.0.190.0030.00616.89
8.0.180.0000.00716.79
8.0.170.0000.00916.86
8.0.160.0030.00316.91
8.0.150.0100.00316.79
8.0.140.0050.00316.68
8.0.130.0060.00013.29
8.0.120.0050.00316.84
8.0.110.0040.00416.85
8.0.100.0000.00716.72
8.0.90.0000.00716.80
8.0.80.0070.01616.82
8.0.70.0000.00816.74
8.0.60.0030.00516.71
8.0.50.0040.00416.79
8.0.30.0130.00617.07
8.0.20.0130.00917.40
8.0.10.0000.00717.03
8.0.00.0130.00516.66
7.4.330.0030.00315.08
7.4.320.0030.00316.56
7.4.300.0030.00316.60
7.4.290.0080.00016.41
7.4.280.0070.00016.47
7.4.270.0100.00016.49
7.4.260.0050.00216.57
7.4.250.0000.00816.41
7.4.240.0040.00416.60
7.4.230.0000.00716.54
7.4.220.0060.01416.58
7.4.210.0100.00716.56
7.4.200.0000.00816.46
7.4.160.0090.00616.40
7.4.150.0100.01417.40
7.4.140.0150.00717.86
7.4.130.0110.00616.38
7.4.120.0100.00916.56
7.4.110.0070.01016.44
7.4.100.0100.00716.43
7.4.90.0120.00416.43
7.4.80.0100.01319.39
7.4.70.0060.01416.57
7.4.60.0100.00716.59
7.4.50.0060.00916.55
7.4.40.0040.01416.61
7.4.30.0150.00216.47
7.4.00.0070.00715.00
7.3.330.0030.00313.20
7.3.320.0000.00513.18
7.3.310.0030.00316.09
7.3.300.0030.00316.07
7.3.290.0160.00316.24
7.3.280.0080.01016.13
7.3.270.0030.01417.40
7.3.260.0160.01016.39
7.3.250.0120.00716.35
7.3.240.0070.01016.25
7.3.230.0130.00416.39
7.3.210.0100.01016.25
7.3.200.0100.00616.39
7.3.190.0030.01416.43
7.3.180.0100.01016.14
7.3.170.0030.01316.27
7.3.160.0190.00316.33
7.3.10.0100.00316.66
7.3.00.0040.01416.48
7.2.330.0130.00716.51
7.2.320.0110.00616.34
7.2.310.0130.00316.66
7.2.300.0040.01316.76
7.2.290.0080.00816.54
7.2.130.0030.01416.88
7.2.120.0070.00716.87
7.2.110.0070.00616.74
7.2.100.0060.00916.64
7.2.90.0030.00616.53
7.2.80.0070.00516.42
7.2.70.0090.00616.62
7.2.60.0050.00716.66
7.2.50.0030.00916.71
7.2.40.0030.00716.69
7.2.30.0130.00016.96
7.2.20.0070.00716.82
7.2.10.0000.01416.71
7.2.00.0050.00618.14
7.1.250.0090.00615.66
7.1.200.0000.01515.67
7.1.100.0030.00717.94
7.1.70.0000.00717.09
7.1.60.0000.01517.16
7.1.00.0100.07022.37
7.0.200.0060.01216.73
7.0.60.0030.07721.72
7.0.50.0170.06320.34
7.0.40.0200.05720.23
7.0.30.0300.04720.26
7.0.20.0200.06320.29
7.0.10.0130.05720.33
7.0.00.0230.05720.46
5.6.210.0030.05020.65
5.6.200.0170.08021.22
5.6.190.0170.06721.13
5.6.180.0270.05321.07
5.6.170.0230.05320.97
5.6.160.0230.06321.02
5.6.150.0230.06321.22
5.6.140.0100.06321.04
5.6.130.0200.06021.13
5.6.120.0200.05720.96
5.6.110.0230.05021.18
5.6.100.0070.06321.03
5.6.90.0100.06321.08
5.6.80.0270.05720.42
5.6.70.0230.06020.35
5.6.60.0130.05320.43
5.6.50.0200.04720.43
5.6.40.0300.05720.53
5.6.30.0170.05320.44
5.6.20.0130.06720.43
5.6.10.0170.05320.41
5.6.00.0270.05720.37
5.5.350.0030.08320.45
5.5.340.0170.06721.03
5.5.330.0070.06320.87
5.5.320.0230.06021.05
5.5.310.0230.05320.88
5.5.300.0400.05321.01
5.5.290.0200.05720.74
5.5.280.0130.06020.87
5.5.270.0200.07021.04
5.5.260.0170.05721.03
5.5.250.0100.06020.83
5.5.240.0200.05020.23
5.5.230.0200.06720.34
5.5.220.0100.05720.38
5.5.210.0230.04320.39
5.5.200.0370.04720.13
5.5.190.0230.06020.20
5.5.180.0230.05320.19
5.5.160.0370.05320.22
5.5.150.0400.04720.15
5.5.140.0130.05320.27
5.5.130.0130.05320.35
5.5.120.0200.05320.28
5.5.110.0300.05320.22
5.5.100.0100.06020.15
5.5.90.0130.05320.08
5.5.80.0070.06020.08
5.5.70.0170.05020.05
5.5.60.0170.06019.96
5.5.50.0130.05320.27
5.5.40.0230.05020.17
5.5.30.0200.05720.26
5.5.20.0170.06320.10
5.5.10.0100.05720.26
5.5.00.0100.06020.08

preferences:
29.08 ms | 403 KiB | 5 Q