3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo {} interface Bar { /** * @return scalar|array|object|null */ public function __get(string $k); } function Baz(string $thing) : bool { return method_exists($thing, '__get'); } function Bat(string $thing) : bool { return (class_exists($thing) || interface_exists($thing)) && (new ReflectionClass($thing))->hasMethod('__get'); } var_dump(Baz(Foo::class), Bat(Foo::class), Baz(Bar::class), Bat(Bar::class));

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.3.130.0040.00416.55
8.3.120.0050.00318.79
8.3.110.0060.00320.94
8.3.100.0040.00424.06
8.3.90.0070.00726.77
8.3.80.0060.00317.97
8.3.70.0120.00316.38
8.3.60.0040.01118.55
8.3.50.0120.00717.35
8.3.40.0000.01418.50
8.3.30.0070.00718.84
8.3.20.0060.00020.79
8.3.10.0070.00023.51
8.3.00.0040.00423.53
8.2.250.0070.01316.81
8.2.240.0050.00517.40
8.2.230.0060.00322.58
8.2.220.0080.00037.54
8.2.210.0030.00526.77
8.2.200.0030.00618.18
8.2.190.0120.00316.58
8.2.180.0110.00416.38
8.2.170.0040.01122.96
8.2.160.0100.00320.39
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0070.00020.35
8.2.120.0000.00826.35
8.2.110.0070.00322.00
8.2.100.0130.00017.78
8.2.90.0100.00616.98
8.2.80.0040.00418.03
8.2.70.0050.00318.03
8.2.60.0000.00718.09
8.2.50.0080.00018.10
8.2.40.0040.00419.16
8.2.30.0040.00419.08
8.2.20.0040.00418.07
8.2.10.0040.00419.08
8.2.00.0070.00018.02
8.1.300.0090.00019.51
8.1.290.0090.00030.84
8.1.280.0150.00625.92
8.1.270.0030.00523.99
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00623.84
8.1.230.0080.00619.06
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.25
8.1.190.0000.00817.41
8.1.180.0080.00018.10
8.1.170.0030.00518.72
8.1.160.0070.00018.89
8.1.150.0040.00418.73
8.1.140.0020.00518.73
8.1.130.0070.00017.41
8.1.120.0000.00717.25
8.1.110.0040.00417.41
8.1.100.0040.00417.45
8.1.90.0040.00417.48
8.1.80.0050.00317.39
8.1.70.0030.00617.30
8.1.60.0080.00017.45
8.1.50.0050.00317.47
8.1.40.0000.00817.51
8.1.30.0040.00417.64
8.1.20.0030.00617.61
8.1.10.0040.00417.34
8.1.00.0030.00617.41
8.0.300.0050.00219.77
8.0.290.0070.00016.63
8.0.280.0000.00818.47
8.0.270.0000.00717.32
8.0.260.0000.00716.84
8.0.250.0080.00016.87
8.0.240.0070.00016.93
8.0.230.0070.00016.98
8.0.220.0090.00016.90
8.0.210.0000.00716.86
8.0.200.0050.00216.94
8.0.190.0000.00716.95
8.0.180.0030.00616.97
8.0.170.0050.00316.94
8.0.160.0000.00716.99
8.0.150.0040.00416.91
8.0.140.0040.00416.76
8.0.130.0000.00613.34
8.0.120.0000.00716.87
8.0.110.0040.00416.94
8.0.100.0040.00416.92
8.0.90.0000.00716.79
8.0.80.0090.00816.91
8.0.70.0070.00016.79
8.0.60.0040.00416.90
8.0.50.0000.00716.80
8.0.30.0070.01216.91
8.0.20.0070.01016.95
8.0.10.0040.00416.82
8.0.00.0110.01216.72
7.4.330.0000.00615.55
7.4.320.0060.00316.59
7.4.300.0040.00416.52
7.4.290.0020.00516.31
7.4.280.0000.00816.59
7.4.270.0040.00416.46
7.4.260.0030.00316.42
7.4.250.0070.00016.49
7.4.240.0000.00716.46
7.4.230.0000.00716.66
7.4.220.0050.00316.63
7.4.210.0080.00816.61
7.4.200.0000.00716.59
7.4.160.0080.00916.53
7.4.140.0100.01017.86
7.4.130.0120.00416.74
7.4.120.0100.01016.64
7.4.110.0070.01316.41
7.4.100.0000.01916.64
7.4.90.0100.00716.48
7.4.80.0060.01619.39
7.4.70.0100.00716.38
7.4.60.0110.01116.45
7.4.50.0090.00316.26
7.4.40.0040.01216.48
7.4.10.0040.01515.07
7.4.00.0050.01214.96
7.3.330.0000.00513.25
7.3.320.0000.00513.32
7.3.310.0000.00716.36
7.3.300.0000.00716.32
7.3.290.0000.00716.13
7.3.280.0120.00416.30
7.3.260.0120.00616.49
7.3.230.0070.01016.53
7.3.210.0090.01416.28
7.3.200.0080.01216.54
7.3.190.0080.01516.34
7.3.180.0060.01116.24
7.3.170.0080.00816.42
7.3.160.0160.00016.35
7.3.130.0040.01415.05
7.3.120.0090.00914.88
7.3.110.0090.00814.69
7.3.100.0050.01114.86
7.3.90.0080.00714.85
7.3.80.0040.00514.93
7.3.70.0040.00914.64
7.3.60.0050.01014.83
7.3.50.0080.00814.61
7.3.40.0040.00614.78
7.3.30.0120.00214.67
7.3.20.0080.00516.69
7.3.10.0210.00916.01
7.3.00.0200.00816.11
7.2.330.0090.00916.29
7.2.320.0030.01416.61
7.2.310.0150.00316.64
7.2.300.0140.00316.69
7.2.290.0120.01316.73
7.2.260.0130.00314.89
7.2.250.0100.00715.14
7.2.240.0030.01115.04
7.2.230.0030.01514.82
7.2.220.0060.01014.84
7.2.210.0080.00614.93
7.2.200.0050.00914.97
7.2.190.0080.00614.96
7.2.180.0080.00614.96
7.2.170.0020.01214.60
7.2.160.0110.00514.81
7.2.150.0020.01416.79
7.2.140.0100.00516.95
7.2.130.0250.00316.23
7.2.120.0180.00816.17
7.2.110.0230.00716.30
7.2.100.0180.00916.15
7.2.90.0290.00415.99
7.2.80.0250.00716.10
7.2.70.0150.00716.14
7.2.60.0210.01016.04
7.2.50.0200.00816.09
7.2.40.0150.00916.13
7.2.30.0200.00715.99
7.2.20.0240.00516.14
7.2.10.0180.00716.05
7.2.00.0170.00616.25
7.1.330.0060.00915.88
7.1.320.0110.00315.76
7.1.310.0110.00215.80
7.1.300.0040.01115.73
7.1.290.0060.00615.66
7.1.280.0050.00815.73
7.1.270.0090.00315.92
7.1.260.0050.00815.81
7.1.250.0210.00815.13
7.1.240.0130.00315.83
7.1.230.0030.01415.88
7.1.220.0070.00715.82
7.1.210.0030.00915.75
7.1.200.0060.00615.57
7.1.190.0060.00615.95
7.1.180.0000.01415.81
7.1.170.0030.00715.85
7.1.160.0000.00915.77
7.1.150.0060.00915.88
7.1.140.0000.00815.80
7.1.130.0000.00915.46
7.1.120.0000.01315.73
7.1.110.0070.00715.80
7.1.100.0090.00315.78
7.1.90.0040.00815.52
7.1.80.0000.01315.94
7.1.70.0030.00615.83
7.1.60.0070.00715.95
7.1.50.0090.00615.81
7.1.40.0060.00915.90
7.1.30.0090.00615.74
7.1.20.0030.00915.61
7.1.10.0060.00615.84
7.1.00.0000.01315.74

preferences:
30.89 ms | 403 KiB | 5 Q