3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { } $ref = new ReflectionClass('A'); var_dump(method_exists($ref, 'getDocComment')); //bool(true) var_dump($ref->getDocComment()); //bool(false) // serialize only the class name $refClass = unserialize(serialize($ref)); try { $refClass->getDocComment(); } catch (Error $e) { $recoveredRef = new ReflectionClass($refClass->getName()); var_dump($recoveredRef); var_dump($recoveredRef->getDocComment()); // works correctly echo "Malformed Reflection object, but recovered: ".$e->getMessage(); }

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.5.30.0100.00817.29
8.5.20.0050.00519.59
8.5.10.0110.00816.65
8.5.00.0160.00519.84
8.4.170.0170.00820.54
8.4.160.0080.01523.93
8.4.150.0030.00014.05
8.4.140.0130.00717.81
8.4.130.0140.00617.99
8.4.120.0150.00518.25
8.4.110.0100.01119.49
8.4.100.0120.00817.94
8.4.90.0030.00620.66
8.4.80.0070.00219.15
8.4.70.0140.00718.93
8.4.60.0100.01018.69
8.4.50.0060.00320.43
8.4.40.0160.00319.53
8.4.30.0100.01019.27
8.4.20.0070.01417.66
8.4.10.0160.00017.68
8.3.300.0100.01020.66
8.3.290.0090.01118.41
8.3.280.0150.01120.16
8.3.270.0090.01116.67
8.3.260.0110.00816.66
8.3.250.0120.00716.53
8.3.240.0140.00516.72
8.3.230.0130.00616.64
8.3.220.0070.00218.94
8.3.210.0040.00516.68
8.3.200.0040.00616.46
8.3.190.0100.01016.67
8.3.180.0090.00818.91
8.3.170.0140.00416.49
8.3.160.0120.00617.13
8.3.150.0110.00719.10
8.3.140.0040.00420.70
8.3.130.0040.00418.31
8.3.120.0090.00618.23
8.3.110.0080.00016.78
8.3.100.0040.01216.60
8.3.90.0080.00026.77
8.3.80.0060.00316.63
8.3.70.0070.01418.18
8.3.60.0060.01216.63
8.3.50.0090.00916.47
8.3.40.0160.00618.97
8.3.30.0140.00018.72
8.3.20.0080.00020.46
8.3.10.0000.00721.96
8.3.00.0000.00823.65
8.2.300.0120.00918.12
8.2.290.0140.00416.62
8.2.280.0120.00720.65
8.2.270.0040.01518.41
8.2.260.0110.00716.79
8.2.250.0040.00416.59
8.2.240.0090.00916.93
8.2.230.0060.00320.94
8.2.220.0030.00624.06
8.2.210.0060.00326.77
8.2.200.0060.00316.50
8.2.190.0040.01116.75
8.2.180.0100.01018.54
8.2.170.0110.00422.96
8.2.160.0140.00419.13
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00721.05
8.2.120.0030.00626.35
8.2.110.0090.00022.21
8.2.100.0000.01118.98
8.2.90.0080.00018.98
8.2.80.0050.00317.97
8.2.70.0030.00517.63
8.2.60.0030.00618.04
8.2.50.0040.00418.10
8.2.40.0040.00420.59
8.2.30.0040.00419.07
8.2.20.0050.00318.00
8.2.10.0000.00717.97
8.2.00.0000.00718.04
8.1.340.0140.00917.88
8.1.330.0110.00816.46
8.1.320.0100.00916.29
8.1.310.0140.00416.64
8.1.300.0060.00318.02
8.1.290.0060.00330.84
8.1.280.0060.00825.92
8.1.270.0040.00423.71
8.1.260.0040.01126.35
8.1.250.0070.00028.09
8.1.240.0060.00322.57
8.1.230.0110.00019.09
8.1.220.0030.00617.74
8.1.210.0110.00018.77
8.1.200.0000.00817.25
8.1.190.0050.00317.00
8.1.180.0030.00618.10
8.1.170.0050.00318.34
8.1.160.0000.00718.80
8.1.150.0000.00720.12
8.1.140.0070.00417.43
8.1.130.0030.00318.88
8.1.120.0030.00317.44
8.1.110.0000.00817.43
8.1.100.0030.00417.23
8.1.90.0040.00417.39
8.1.80.0000.00717.46
8.1.70.0030.00317.40
8.1.60.0060.00317.46
8.1.50.0040.00417.45
8.1.40.0060.00317.41
8.1.30.0000.00817.69
8.1.20.0000.00717.63
8.1.10.0050.00317.58
8.1.00.0040.00417.52
8.0.300.0040.00419.58
8.0.290.0000.00816.63
8.0.280.0030.00318.38
8.0.270.0000.00816.80
8.0.260.0030.00318.45
8.0.250.0000.00716.95
8.0.240.0000.00716.99
8.0.230.0000.00716.95
8.0.220.0030.00716.76
8.0.210.0030.00316.89
8.0.200.0030.00316.91
8.0.190.0030.00616.94
8.0.180.0040.00416.90
8.0.170.0000.00716.95
8.0.160.0000.00716.73
8.0.150.0030.00616.82
8.0.140.0030.00516.84
8.0.130.0000.00513.27
8.0.120.0040.00416.80
8.0.110.0040.00416.84
8.0.100.0040.00416.94
8.0.90.0040.00416.80
8.0.80.0100.00616.91
8.0.70.0000.00716.74
8.0.60.0040.00416.84
8.0.50.0060.00316.77
8.0.30.0110.00616.93
8.0.20.0120.00817.40
8.0.10.0040.00416.95
8.0.00.0060.01216.68
7.4.330.0000.00515.55
7.4.320.0000.00616.45
7.4.300.0030.00316.51
7.4.290.0070.00316.43
7.4.280.0030.00516.50
7.4.270.0070.00316.63
7.4.260.0000.00716.49
7.4.250.0000.00716.48
7.4.240.0000.00716.49
7.4.230.0000.00816.70
7.4.220.0090.00916.46
7.4.210.0000.01616.54
7.4.200.0040.00416.62
7.4.160.0090.00616.46
7.4.150.0100.00617.40
7.4.140.0100.01017.86
7.4.130.0090.00916.50
7.4.120.0100.00916.42
7.4.110.0120.01216.57
7.4.100.0210.00316.40
7.4.90.0030.01316.29
7.4.80.0090.01319.39
7.4.70.0120.00416.67
7.4.60.0100.00716.49
7.4.50.0000.01516.45
7.4.40.0150.00316.51
7.4.30.0030.01416.31
7.4.00.0000.01715.10
7.3.330.0030.00313.33
7.3.320.0030.00313.18
7.3.310.0000.00716.30
7.3.300.0030.00316.37
7.3.290.0080.00716.29
7.3.280.0090.00916.30
7.3.270.0140.00417.40
7.3.260.0130.00516.48
7.3.250.0080.01216.52
7.3.240.0120.00616.41
7.3.230.0100.01016.52
7.3.210.0070.01016.23
7.3.200.0060.01116.35
7.3.190.0110.00716.24
7.3.180.0150.00616.67
7.3.170.0070.00716.45
7.3.160.0000.01616.34
7.3.10.0090.00316.24
7.3.00.0040.01116.62
7.2.330.0110.01116.89
7.2.320.0100.01316.53
7.2.310.0130.00916.77
7.2.300.0100.01016.44
7.2.290.0060.01116.87
7.2.130.0030.00616.75
7.2.120.0070.00416.26
7.2.110.0070.00716.56
7.2.100.0080.00616.48
7.2.90.0110.00416.57
7.2.80.0140.00316.70
7.2.70.0040.01116.64
7.2.60.0050.00816.97
7.2.50.0050.00616.57
7.2.40.0000.01716.84
7.2.30.0030.00916.74
7.2.20.0030.00716.87
7.2.10.0000.01216.58
7.2.00.0160.00017.07
7.1.250.0060.00615.55
7.1.200.0000.01115.85
7.1.90.0060.00618.12
7.1.80.0060.00618.16
7.1.70.0060.00617.02
7.1.60.0210.00434.96
7.1.50.0060.01834.73
7.1.40.0130.01334.45
7.1.30.0150.00934.48
7.1.20.0090.01634.72
7.1.10.0030.00916.43
7.1.00.0030.00916.48
7.0.230.0040.01417.92
7.0.220.0030.00917.93
7.0.210.0060.00616.66
7.0.200.0060.00616.77
7.0.190.0030.00916.82
7.0.180.0030.00916.17
7.0.170.0030.00916.10
7.0.160.0000.01216.27
7.0.150.0060.00616.16
7.0.140.0030.00916.20
7.0.130.0060.00616.33
7.0.120.0000.01216.35
7.0.110.0000.01216.31
7.0.100.0040.00816.28
7.0.90.0000.01216.48
7.0.80.0000.01216.36
7.0.70.0000.01316.25
7.0.60.0050.00816.16
7.0.50.0030.01016.34
7.0.40.0040.00816.31
7.0.30.0060.00616.57
7.0.20.0000.01216.23
7.0.10.0060.00616.54
7.0.00.0000.01216.26

preferences:
199.42 ms | 403 KiB | 5 Q