3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait tSB_FormFieldObject { } interface iSB_FormFieldObject { } class SB_FormFieldObject implements iSB_FormFieldObject { use tSB_FormFieldObject; public $Test2 = "aa"; } function test($a=null) { echo "trait: " .($a instanceof tSB_FormFieldObject) . PHP_EOL; echo "interface: " .($a instanceof iSB_FormFieldObject) . PHP_EOL; echo "using: " .(is_using($a, "tSB_FormFieldffObject")) . PHP_EOL; echo "instanceof: " .(is_instance_of($a, "tSB_FormFieldfObject")) . PHP_EOL; } function is_using($class, $trait) { return in_array($trait, (new ReflectionClass($class))->getTraitNames()); } function is_instance_of($sub, $super) { $sub = (string)$sub; $super = is_object($super) ? get_class($super) : (string)$super; switch(true) { case $sub === $super; // well ... conformity case is_subclass_of($sub, $super): case in_array($super, class_implements($sub)): return true; default: return false; } } $a = new SB_FormFieldObject(); test($a); ?>

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.60.0100.01018.39
8.3.50.0180.01116.74
8.3.40.0070.00718.71
8.3.30.0090.00618.82
8.3.20.0090.00618.85
8.3.10.0000.00818.69
8.3.00.0050.00319.38
8.2.180.0070.01516.63
8.2.170.0120.00922.96
8.2.160.0130.00619.08
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00419.66
8.2.110.0070.00322.20
8.2.100.0040.00817.97
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0030.00517.63
8.2.60.0050.00317.78
8.2.50.0050.00317.93
8.2.40.0030.00519.48
8.2.30.0090.00317.75
8.2.20.0040.00717.74
8.2.10.0000.00717.79
8.2.00.0070.00017.82
8.1.280.0120.00625.92
8.1.270.0000.00923.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.77
8.1.230.0080.00319.35
8.1.220.0000.00717.74
8.1.210.0030.00618.77
8.1.200.0100.00017.36
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0030.00617.62
8.1.160.0020.00519.02
8.1.150.0040.00418.59
8.1.140.0030.00617.45
8.1.130.0030.00317.41
8.1.120.0050.00217.34
8.1.110.0000.00717.39
8.1.100.0040.00417.43
8.1.90.0020.00517.46
8.1.80.0040.00417.51
8.1.70.0070.00017.40
8.1.60.0040.00417.59
8.1.50.0030.00517.39
8.1.40.0040.00417.47
8.1.30.0030.00617.57
8.1.20.0040.00517.68
8.1.10.0040.00417.50
8.1.00.0040.00417.39
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00718.58
8.0.270.0030.00317.32
8.0.260.0070.00016.86
8.0.250.0000.00817.01
8.0.240.0000.00817.03
8.0.230.0000.00817.03
8.0.220.0060.00316.95
8.0.210.0040.00416.87
8.0.200.0070.00016.92
8.0.190.0000.00817.03
8.0.180.0040.00416.84
8.0.170.0000.01016.91
8.0.160.0070.00016.96
8.0.150.0000.00816.85
8.0.140.0070.00016.85
8.0.130.0040.00413.36
8.0.120.0000.00916.81
8.0.110.0050.00216.91
8.0.100.0040.00416.79
8.0.90.0070.00017.01
8.0.80.0030.01416.96
8.0.70.0000.00716.95
8.0.60.0030.00616.83
8.0.50.0000.00817.01
8.0.30.0090.01216.86
8.0.20.0100.00817.05
8.0.10.0000.00717.16
8.0.00.0080.01016.85
7.4.330.0020.00213.00
7.4.320.0000.00616.52
7.4.300.0000.00716.63
7.4.290.0080.00416.62
7.4.280.0060.00316.52
7.4.270.0030.00716.63
7.4.260.0030.00313.23
7.4.250.0080.00016.52
7.4.240.0040.00416.54
7.4.230.0000.00716.51
7.4.220.0030.01316.41
7.4.210.0120.00316.63
7.4.200.0030.00316.71
7.4.190.0030.00516.66
7.4.160.0030.01316.37
7.4.150.0050.01116.55
7.4.140.0150.00917.86
7.4.130.0150.00416.39
7.4.120.0070.01116.43
7.4.110.0110.00716.58
7.4.100.0080.01816.65
7.4.90.0090.00916.38
7.4.80.0130.00619.39
7.4.70.0090.01316.60
7.4.60.0090.00916.50
7.4.50.0030.00316.71
7.4.40.0030.00816.49
7.4.30.0080.00816.51
7.4.10.0040.01514.98
7.4.00.0040.01214.85
7.3.330.0000.00613.39
7.3.320.0050.00013.38
7.3.310.0040.00416.48
7.3.300.0000.00716.40
7.3.290.0070.00716.45
7.3.280.0070.01416.43
7.3.270.0160.00916.50
7.3.260.0160.00316.45
7.3.240.0030.01416.31
7.3.230.0100.00816.48
7.3.210.0110.00616.41
7.3.200.0100.01016.45
7.3.190.0060.01116.46
7.3.180.0060.01016.50
7.3.170.0110.00916.71
7.3.160.0110.01116.56
7.3.130.0070.01114.65
7.3.120.0030.01214.80
7.3.110.0090.00614.81
7.3.100.0070.00714.71
7.3.90.0040.01414.73
7.3.80.0090.00614.55
7.3.70.0100.00714.56
7.3.60.0000.01114.75
7.3.50.0040.01114.39
7.3.40.0130.00314.69
7.3.30.0120.00614.69
7.3.20.0060.00316.45
7.3.10.0040.01216.64
7.3.00.0040.01116.71
7.2.330.0120.01216.81
7.2.320.0120.00616.83
7.2.310.0140.00616.70
7.2.300.0190.00416.46
7.2.290.0060.01016.56
7.2.260.0100.00715.12
7.2.250.0060.01314.65
7.2.240.0100.00715.09
7.2.230.0080.00814.65
7.2.220.0030.01615.20
7.2.210.0060.00615.04
7.2.200.0180.00014.91
7.2.190.0070.01114.90
7.2.180.0080.00314.92
7.2.170.0040.01514.95
7.2.160.0090.00314.93
7.2.150.0070.00716.34
7.2.140.0000.01516.68
7.2.130.0060.00916.68
7.2.120.0030.00717.01
7.2.110.0080.00816.68
7.2.100.0070.01116.66
7.2.90.0090.00616.78
7.2.80.0060.00616.48
7.2.70.0130.00716.51
7.2.60.0140.00416.60
7.2.50.0040.00916.77
7.2.40.0000.01316.94
7.2.30.0120.00317.16
7.2.20.0000.01416.88
7.2.10.0040.00916.68
7.2.00.0070.00918.02
7.1.330.0070.00715.52
7.1.320.0070.00715.75
7.1.310.0040.01115.53
7.1.300.0030.01015.30
7.1.290.0040.00815.60
7.1.280.0030.01215.73
7.1.270.0060.00915.61
7.1.260.0110.00415.77
7.1.250.0030.01015.55
7.1.240.0070.00415.52
7.1.230.0060.00915.44
7.1.220.0000.01115.40
7.1.210.0040.00715.29
7.1.200.0040.01315.51
7.1.190.0100.00715.66
7.1.180.0000.01115.46
7.1.170.0150.00015.49
7.1.160.0000.01315.28
7.1.150.0060.00615.32
7.1.140.0040.00815.51
7.1.130.0000.01115.55
7.1.120.0080.00315.43
7.1.110.0060.00615.63
7.1.100.0060.00615.87
7.1.90.0060.00615.75
7.1.80.0120.00315.11
7.1.70.0050.00816.37
7.1.60.0060.01217.35
7.1.50.0090.00916.16
7.1.40.0040.00415.48
7.1.30.0090.00615.45
7.1.20.0080.00615.14
7.1.10.0060.00915.24
7.1.00.0000.03918.92
7.0.330.0120.00615.01
7.0.320.0060.00315.53
7.0.310.0030.01614.85
7.0.300.0040.00415.13
7.0.290.0090.00415.11
7.0.280.0060.00615.03
7.0.270.0000.00914.88
7.0.260.0100.00015.19
7.0.250.0000.01114.82
7.0.240.0060.00315.24
7.0.230.0110.00415.32
7.0.220.0130.00015.23
7.0.210.0070.00715.11
7.0.200.0040.00615.98
7.0.190.0040.00815.19
7.0.180.0000.00914.89
7.0.170.0060.00315.11
7.0.160.0040.00815.18
7.0.150.0030.01015.12
7.0.140.0050.04118.59
7.0.130.0030.01015.38
7.0.120.0050.04218.67
7.0.110.0030.00915.23
7.0.100.0000.00815.14
7.0.90.0090.00615.42
7.0.80.0040.00815.32
7.0.70.0060.00615.01
7.0.60.0120.03617.56
7.0.50.0080.03016.59
7.0.40.0020.03415.68
7.0.30.0070.04715.51
7.0.20.0020.02815.50
7.0.10.0030.03915.58
7.0.00.0100.02715.57
5.6.400.0070.01314.07
5.6.390.0100.00614.37
5.6.380.0040.01114.20
5.6.370.0060.00913.78
5.6.360.0110.00313.64
5.6.350.0000.01113.98
5.6.340.0060.00613.85
5.6.330.0080.00313.95
5.6.320.0000.01213.71
5.6.310.0080.00514.25
5.6.300.0060.00914.29
5.6.290.0000.01514.17
5.6.280.0070.03817.57
5.6.270.0040.00714.36
5.6.260.0000.01214.23
5.6.250.0070.00714.05
5.6.240.0000.00914.25
5.6.230.0030.01014.13
5.6.220.0000.01614.18
5.6.210.0080.03817.30
5.6.200.0090.04116.24
5.6.190.0050.03316.25
5.6.180.0070.03816.21
5.6.170.0080.02316.22
5.6.160.0030.02916.15
5.6.150.0020.04916.37
5.6.140.0050.03416.18
5.6.130.0050.02516.36
5.6.120.0070.02116.09
5.6.110.0090.03716.15
5.6.100.0130.03216.23
5.6.90.0060.04316.00
5.6.80.0020.03615.82
5.6.70.0070.02215.90
5.6.60.0020.02815.90
5.6.50.0060.04515.67
5.6.40.0020.03915.74
5.6.30.0050.03715.82
5.6.20.0110.02015.86
5.6.10.0050.04515.77
5.6.00.0120.03815.83
5.5.380.0000.01114.44
5.5.370.0090.00614.31
5.5.360.0080.00314.39
5.5.350.0230.03317.36
5.5.340.0040.04616.14
5.5.330.0070.04316.14
5.5.320.0060.04416.03
5.5.310.0130.03515.95
5.5.300.0030.02715.99
5.5.290.0090.04016.10
5.5.280.0090.04016.10
5.5.270.0060.04616.11
5.5.260.0110.03816.21
5.5.250.0070.04415.93
5.5.240.0060.02515.94
5.5.230.0080.03215.79
5.5.220.0050.02415.62
5.5.210.0030.02415.83
5.5.200.0100.03815.80
5.5.190.0080.03115.88
5.5.180.0100.01915.94
5.5.170.0110.00613.85
5.5.160.0070.04015.71
5.5.150.0050.03215.68
5.5.140.0080.04015.71
5.5.130.0080.04015.83
5.5.120.0110.03815.72
5.5.110.0030.04315.82
5.5.100.0070.02915.63
5.5.90.0060.03115.73
5.5.80.0020.03715.74
5.5.70.0070.02815.65
5.5.60.0080.03015.57
5.5.50.0110.03815.59
5.5.40.0050.02415.75
5.5.30.0080.03315.79
5.5.20.0050.02715.70
5.5.10.0040.03715.58
5.5.00.0050.02815.58
5.4.450.0030.02715.63
5.4.440.0030.02615.66
5.4.430.0070.04015.67
5.4.420.0090.04215.61
5.4.410.0070.03815.58
5.4.400.0060.03515.47
5.4.390.0020.04515.47
5.4.380.0030.02615.46
5.4.370.0070.03715.46
5.4.360.0070.03915.47
5.4.350.0050.02615.46
5.4.340.0090.01815.49
5.4.330.0030.00611.88
5.4.320.0060.03715.49
5.4.310.0060.02115.39
5.4.300.0060.02515.48
5.4.290.0100.03715.45
5.4.280.0050.04115.46
5.4.270.0100.02315.46
5.4.260.0060.04315.49
5.4.250.0110.03415.46
5.4.240.0030.03115.46
5.4.230.0090.03815.45
5.4.220.0090.04015.57
5.4.210.0050.03815.46
5.4.200.0060.02115.48
5.4.190.0110.02415.46
5.4.180.0090.02515.45
5.4.170.0040.02915.46
5.4.160.0050.04215.38
5.4.150.0110.03015.44
5.4.140.0100.03714.09
5.4.130.0070.02014.12
5.4.120.0060.01814.26
5.4.110.0100.03514.17
5.4.100.0050.04114.26
5.4.90.0050.03814.21
5.4.80.0020.04114.19
5.4.70.0020.03814.16
5.4.60.0090.03714.16
5.4.50.0170.02014.14
5.4.40.0060.02614.24
5.4.30.0080.03814.21
5.4.20.0050.02014.15
5.4.10.0060.04014.15
5.4.00.0050.02813.88
5.3.290.0060.03013.23
5.3.280.0020.02813.23
5.3.270.0020.04513.22
5.3.260.0030.03013.21
5.3.250.0030.04413.21
5.3.240.0090.02013.28
5.3.230.0030.02413.23
5.3.220.0020.02413.11
5.3.210.0060.03013.21
5.3.200.0050.02813.20
5.3.190.0030.04513.19
5.3.180.0060.04113.26
5.3.170.0030.04213.21
5.3.160.0050.03013.14
5.3.150.0070.03513.14
5.3.140.0040.04213.17
5.3.130.0050.03113.12
5.3.120.0060.02613.18
5.3.110.0040.02713.14
5.3.100.0090.03612.94
5.3.90.0040.04212.91
5.3.80.0050.04112.94
5.3.70.0070.04012.99
5.3.60.0080.03812.92
5.3.50.0100.03112.89
5.3.40.0000.04412.89
5.3.30.0110.03712.88
5.3.20.0030.03212.67
5.3.10.0060.01812.75
5.3.00.0050.02212.73
5.2.170.0070.05711.13
5.2.160.0100.02710.93
5.2.150.0070.05711.12
5.2.140.0030.06310.97
5.2.130.0100.02711.00
5.2.120.0100.03711.10
5.2.110.0100.02711.09
5.2.100.0100.04311.02
5.2.90.0070.05011.24
5.2.80.0030.06011.05
5.2.70.0070.06311.05
5.2.60.0070.03710.95
5.2.50.0070.04010.84
5.2.40.0030.04710.97
5.2.30.0070.03010.91
5.2.20.0000.04011.11
5.2.10.0070.03010.75
5.2.00.0030.06310.71
5.1.60.0000.04310.05
5.1.50.0030.0339.96
5.1.40.0000.05010.00
5.1.30.0030.05310.22
5.1.20.0030.03010.49
5.1.10.0070.05310.04
5.1.00.0070.03710.00
5.0.50.0000.0308.53
5.0.40.0030.0208.41
5.0.30.0070.0478.26
5.0.20.0000.0308.39
5.0.10.0100.0378.15
5.0.00.0000.0608.23
4.4.90.0000.0177.44
4.4.80.0000.0207.44
4.4.70.0030.0177.44
4.4.60.0000.0377.44
4.4.50.0030.0207.44
4.4.40.0030.0537.44
4.4.30.0070.0307.44
4.4.20.0000.0277.44
4.4.10.0000.0177.44
4.4.00.0030.0507.44
4.3.110.0000.0207.44
4.3.100.0000.0177.44
4.3.90.0000.0237.44
4.3.80.0070.0507.44
4.3.70.0030.0137.44
4.3.60.0030.0137.44
4.3.50.0000.0177.44
4.3.40.0030.0237.44
4.3.30.0000.0177.44
4.3.20.0000.0177.44
4.3.10.0030.0137.44
4.3.00.0000.0137.44

preferences:
51.59 ms | 401 KiB | 5 Q