3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Hoge { private $val = 1; public function getVal() { return $this->val; } } trait MyTrait { public function cry() { echo "nya"; } } function check($class_name) { echo "================ ", $class_name, "\n"; $h = new \ReflectionClass($class_name); echo "abstract? ", $h->isAbstract() ? "true" : "false" , "\n"; echo "trait? ", $h->isTrait() ? "true" : "false" , "\n"; echo "interface? ", $h->isInterface() ? "true" : "false" , "\n"; echo "実体化可能? ", $h->isInstantiable() ? "true" : "false" , "\n"; } check("Hoge"); check("MyTrait");

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.40.0030.01218.57
8.3.30.0090.00618.57
8.3.20.0040.00420.11
8.3.10.0080.00023.66
8.3.00.0080.00020.84
8.2.170.0090.00622.96
8.2.160.0100.00320.38
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00021.19
8.2.120.0050.00326.35
8.2.110.0060.00322.08
8.2.100.0090.00317.84
8.2.90.0060.00317.63
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0040.00417.63
8.2.50.0050.00318.05
8.2.40.0060.00318.09
8.2.30.0000.00818.00
8.2.20.0050.00317.58
8.2.10.0000.00718.16
8.2.00.0040.00417.98
8.1.270.0080.00020.41
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0060.00323.81
8.1.230.0090.00319.00
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0000.00818.29
8.1.160.0060.00318.82
8.1.150.0040.00418.88
8.1.140.0080.00019.61
8.1.130.0040.00417.52
8.1.120.0030.00417.27
8.1.110.0040.00417.43
8.1.100.0000.00717.29
8.1.90.0040.00417.41
8.1.80.0050.00317.28
8.1.70.0030.00317.27
8.1.60.0000.00917.59
8.1.50.0060.00317.48
8.1.40.0030.00517.52
8.1.30.0000.00817.64
8.1.20.0070.00017.69
8.1.10.0040.00417.47
8.1.00.0000.00717.41
8.0.300.0000.00719.58
8.0.290.0060.00316.63
8.0.280.0030.00318.36
8.0.270.0030.00317.18
8.0.260.0080.00017.27
8.0.250.0030.00316.97
8.0.240.0030.00316.92
8.0.230.0030.00316.95
8.0.220.0000.00716.80
8.0.210.0070.00016.82
8.0.200.0000.00616.89
8.0.190.0000.00716.88
8.0.180.0000.00816.89
8.0.170.0050.00216.79
8.0.160.0000.00716.93
8.0.150.0070.00016.77
8.0.140.0040.00416.69
8.0.130.0030.00313.22
8.0.120.0050.00316.71
8.0.110.0080.00016.73
8.0.100.0000.00716.68
8.0.90.0040.00416.88
8.0.80.0030.01216.74
8.0.70.0000.00716.75
8.0.60.0030.00616.70
8.0.50.0000.00716.90
8.0.30.0100.00717.19
8.0.20.0090.01017.40
8.0.10.0000.00716.94
8.0.00.0110.00916.74
7.4.330.0000.00516.85
7.4.320.0000.00616.46
7.4.300.0050.00216.41
7.4.290.0030.00616.52
7.4.280.0090.00016.50
7.4.270.0000.00816.63
7.4.260.0030.00316.61
7.4.250.0000.00716.50
7.4.240.0020.00516.48
7.4.230.0050.00316.40
7.4.220.0130.00616.43
7.4.210.0100.00716.71
7.4.200.0040.00416.58
7.4.160.0140.00316.70
7.4.150.0180.00317.40
7.4.140.0170.00517.86
7.4.130.0130.00416.54
7.4.120.0120.00516.57
7.4.110.0120.00916.46
7.4.100.0060.01216.47
7.4.90.0100.00716.58
7.4.80.0120.00619.39
7.4.70.0180.00316.60
7.4.60.0140.00316.58
7.4.50.0060.00916.26
7.4.40.0090.00916.54
7.4.30.0130.00416.44
7.4.10.0090.01014.71
7.4.00.0140.00315.04
7.3.330.0030.00313.25
7.3.320.0040.00413.13
7.3.310.0070.00016.36
7.3.300.0030.00316.32
7.3.290.0030.01116.29
7.3.280.0060.01016.28
7.3.270.0110.00717.40
7.3.260.0090.00916.59
7.3.250.0080.01216.48
7.3.240.0070.01016.43
7.3.230.0130.01016.58
7.3.210.0090.00916.70
7.3.200.0040.01416.50
7.3.190.0130.00316.30
7.3.180.0130.00316.42
7.3.170.0060.01216.41
7.3.160.0100.00916.52
7.3.130.0030.01214.94
7.3.120.0150.00314.95
7.3.110.0100.01014.66
7.3.100.0080.00414.79
7.3.90.0110.00414.54
7.3.80.0120.00314.66
7.3.70.0090.00615.07
7.3.60.0050.00514.98
7.3.50.0060.00914.57
7.3.40.0030.01114.56
7.3.30.0070.00714.75
7.3.20.0070.00716.71
7.3.10.0060.01016.65
7.3.00.0040.00716.66
7.2.330.0160.00616.70
7.2.320.0100.01316.72
7.2.310.0060.01116.29
7.2.300.0110.00816.39
7.2.290.0130.00316.65
7.2.260.0070.01115.19
7.2.250.0040.01514.86
7.2.240.0060.00914.93
7.2.230.0100.00315.02
7.2.220.0070.01315.17
7.2.210.0050.00514.86
7.2.200.0080.00314.96
7.2.190.0040.01115.10
7.2.180.0090.00014.92
7.2.170.0070.00414.91
7.2.160.0040.00814.81
7.2.150.0070.01016.64
7.2.140.0100.00716.97
7.2.130.0050.00616.65
7.2.120.0030.01316.87
7.2.110.0000.01616.80
7.2.100.0090.00617.01
7.2.90.0000.01716.76
7.2.80.0030.01016.61
7.2.70.0110.00316.78
7.2.60.0050.00716.84
7.2.50.0070.00717.03
7.2.40.0090.00616.75
7.2.30.0030.00916.62
7.2.20.0090.00916.80
7.2.10.0030.00916.81
7.2.00.0070.00918.15
7.1.330.0110.00415.84
7.1.320.0000.01315.98
7.1.310.0040.00715.84
7.1.300.0130.00315.81
7.1.290.0030.00615.72
7.1.280.0070.00315.68
7.1.270.0040.01115.78
7.1.260.0080.00815.86
7.1.250.0060.00615.76
7.1.240.0030.00715.63
7.1.230.0070.00715.91
7.1.220.0030.01315.78
7.1.210.0140.00015.89
7.1.200.0020.00915.76
7.1.190.0030.01315.71
7.1.180.0130.00315.48
7.1.170.0090.00615.86
7.1.160.0060.00615.70
7.1.150.0060.00615.80
7.1.140.0040.01415.95
7.1.130.0060.00615.95
7.1.120.0070.00315.48
7.1.110.0040.01015.77
7.1.100.0040.01016.81
7.1.90.0060.00315.52
7.1.80.0110.00415.84
7.1.70.0060.00316.52
7.1.60.0080.00617.78
7.1.50.0120.00716.20
7.1.40.0090.00915.79
7.1.30.0070.01015.66
7.1.20.0030.01515.82
7.1.10.0030.00715.72
7.1.00.0070.04019.08
7.0.330.0040.00915.33
7.0.320.0030.01315.45
7.0.310.0060.00315.30
7.0.300.0060.00315.45
7.0.290.0140.00015.20
7.0.280.0040.01115.52
7.0.270.0070.00715.38
7.0.260.0080.00315.46
7.0.250.0040.01115.41
7.0.240.0030.01015.54
7.0.230.0060.00615.32
7.0.220.0060.00615.13
7.0.210.0040.01115.64
7.0.200.0050.00515.96
7.0.190.0120.00615.39
7.0.180.0060.01215.38
7.0.170.0090.01015.53
7.0.160.0070.00715.46
7.0.150.0000.01215.60
7.0.140.0090.00315.43
7.0.130.0090.00615.49
7.0.120.0040.00415.38
7.0.110.0040.01015.42
7.0.100.0100.00315.23
7.0.90.0090.00615.34
7.0.80.0100.00315.48
7.0.70.0030.00715.42
7.0.60.0070.03817.87
7.0.50.0060.02616.72
7.0.40.0030.04916.93
7.0.30.0220.04616.96
7.0.20.0190.04016.72
7.0.10.0080.04516.81
7.0.00.0060.04716.72
5.6.400.0030.01314.44
5.6.390.0030.01514.34
5.6.380.0060.00614.28
5.6.370.0110.00014.62
5.6.360.0030.00614.54
5.6.350.0030.01014.34
5.6.340.0070.00714.23
5.6.330.0000.01314.15
5.6.320.0110.00414.36
5.6.310.0110.00414.11
5.6.300.0030.01014.32
5.6.290.0000.01814.12
5.6.280.0020.02917.66
5.6.270.0080.00014.58
5.6.260.0030.01414.14
5.6.250.0080.00814.31
5.6.240.0030.00814.42
5.6.230.0000.01814.53
5.6.220.0000.01314.21
5.6.210.0050.04217.39
5.6.200.0070.03016.24
5.6.190.0070.03017.46
5.6.180.0150.04317.43
5.6.170.0140.03417.48
5.6.160.0120.04317.46
5.6.150.0060.02316.22
5.6.140.0030.02316.21
5.6.130.0130.03816.31
5.6.120.0080.02217.55
5.6.110.0070.03217.73
5.6.100.0020.03117.71
5.6.90.0020.02717.62
5.6.80.0120.03317.41
5.6.70.0090.00314.09
5.6.60.0090.00014.21
5.6.50.0030.01014.16
5.6.40.0070.00714.14
5.6.30.0070.00714.15
5.6.20.0060.00613.91
5.6.10.0030.00914.48
5.6.00.0080.00614.10
5.5.380.0070.00314.05
5.5.370.0100.00314.23
5.5.360.0000.01214.46
5.5.350.2180.02517.40
5.5.340.0100.03916.06
5.5.330.0040.05017.25
5.5.320.0150.02217.33
5.5.310.0210.04117.29
5.5.300.0040.03416.25
5.5.290.0050.04016.02
5.5.280.0050.02517.60
5.5.270.0070.03117.70
5.5.260.0060.04617.51
5.5.250.0050.03417.56
5.5.240.1970.02617.30
5.5.230.0030.00914.03
5.5.220.0040.00414.03
5.5.210.0080.00814.20
5.5.200.0040.01113.79
5.5.190.0000.00913.95
5.5.180.0070.00714.06
5.5.170.0030.01213.90
5.5.160.0000.01514.06
5.5.150.0030.01014.24
5.5.140.0030.00814.43
5.5.130.0090.00614.27
5.5.120.0100.00714.28
5.5.110.0070.00713.85
5.5.100.0060.01214.32
5.5.90.0030.00914.19
5.5.80.0070.00713.92
5.5.70.0070.00414.02
5.5.60.0070.00714.19
5.5.50.0000.00813.75
5.5.40.0040.01114.30
5.5.30.0110.00314.19
5.5.20.0000.01314.38
5.5.10.0110.00314.27
5.5.00.0040.00414.31

preferences:
36.67 ms | 400 KiB | 5 Q