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_FormFieldObject")) . PHP_EOL; echo "instanceof: " .(is_instance_of($a, tSB_FormFieldObject)) . 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.01016.88
8.3.50.0100.01016.44
8.3.40.0120.00918.62
8.3.30.0090.00618.79
8.3.20.0080.00018.77
8.3.10.0080.00018.90
8.3.00.0060.00319.50
8.2.180.0110.00425.92
8.2.170.0150.00018.96
8.2.160.0100.00322.96
8.2.150.0060.00325.66
8.2.140.0070.00024.66
8.2.130.0000.00726.16
8.2.120.0040.00419.66
8.2.110.0060.00320.91
8.2.100.0110.00017.90
8.2.90.0030.00517.91
8.2.80.0040.00417.97
8.2.70.0050.00317.75
8.2.60.0000.00817.63
8.2.50.0030.00617.75
8.2.40.0040.00419.36
8.2.30.0030.00817.76
8.2.20.0070.00317.64
8.2.10.0070.00017.71
8.2.00.0040.00417.87
8.1.280.0130.00725.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.99
8.1.230.0030.00920.94
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0030.00517.23
8.1.180.0030.00618.10
8.1.170.0080.00018.77
8.1.160.0030.00519.13
8.1.150.0050.00318.71
8.1.140.0050.00217.38
8.1.130.0040.00417.46
8.1.120.0040.00417.54
8.1.110.0050.00217.31
8.1.100.0000.00717.43
8.1.90.0000.00817.50
8.1.80.0000.00817.51
8.1.70.0030.00317.47
8.1.60.0000.00817.61
8.1.50.0000.00817.56
8.1.40.0070.00017.43
8.1.30.0050.00317.57
8.1.20.0000.00917.53
8.1.10.0040.00417.49
8.1.00.0050.00217.50
8.0.300.0030.00619.90
8.0.290.0050.00316.75
8.0.280.0070.00318.63
8.0.270.0070.00017.18
8.0.260.0030.00316.89
8.0.250.0060.00316.98
8.0.240.0070.00017.00
8.0.230.0040.00416.96
8.0.220.0000.00917.01
8.0.210.0080.00016.79
8.0.200.0030.00317.02
8.0.190.0000.00816.90
8.0.180.0040.00416.99
8.0.170.0090.00016.99
8.0.160.0000.00816.93
8.0.150.0040.00416.88
8.0.140.0070.00016.80
8.0.130.0030.00613.40
8.0.120.0000.00916.91
8.0.110.0000.00716.83
8.0.100.0000.00716.84
8.0.90.0000.00816.90
8.0.80.0050.01016.88
8.0.70.0020.00516.91
8.0.60.0090.00016.77
8.0.50.0000.00817.01
8.0.30.0100.01017.25
8.0.20.0140.00816.91
8.0.10.0070.00017.05
8.0.00.0060.01316.84
7.4.330.0000.00513.12
7.4.320.0040.00416.52
7.4.300.0030.00316.51
7.4.290.0100.00016.50
7.4.280.0000.00716.49
7.4.270.0030.00716.56
7.4.260.0000.00613.21
7.4.250.0000.01016.49
7.4.240.0000.00716.45
7.4.230.0050.00316.72
7.4.220.0100.01016.48
7.4.210.0070.00716.66
7.4.200.0030.00316.36
7.4.190.0030.00516.61
7.4.160.0080.01116.61
7.4.150.0150.00616.58
7.4.140.0060.01217.86
7.4.130.0090.00916.54
7.4.120.0050.01316.68
7.4.110.0070.01316.72
7.4.100.0100.00916.56
7.4.90.0060.01216.62
7.4.80.0130.01016.70
7.4.70.0110.00616.51
7.4.60.0080.00816.64
7.4.50.0090.00016.33
7.4.40.0060.00616.59
7.4.30.0060.01216.30
7.4.10.0100.00715.14
7.4.00.0080.00814.99
7.3.330.0030.00313.20
7.3.320.0000.00513.34
7.3.310.0040.00416.34
7.3.300.0070.00016.44
7.3.290.0060.00816.42
7.3.280.0070.01416.31
7.3.270.0090.00916.49
7.3.260.0120.00616.71
7.3.240.0120.00616.63
7.3.230.0100.01016.50
7.3.210.0120.00616.73
7.3.200.0160.00419.39
7.3.190.0070.01016.37
7.3.180.0090.00616.71
7.3.170.0080.00916.64
7.3.160.0060.01116.48
7.3.130.0110.00715.09
7.3.120.0070.01014.94
7.3.110.0080.00914.89
7.3.100.0060.01014.76
7.3.90.0070.00414.80
7.3.80.0080.00815.00
7.3.70.0060.00514.82
7.3.60.0030.00914.87
7.3.50.0040.01014.64
7.3.40.0080.00614.80
7.3.30.0030.00914.78
7.3.20.0070.00516.72
7.3.10.0070.01016.60
7.3.00.0090.00716.46
7.2.330.0120.00616.54
7.2.320.0060.01616.59
7.2.310.0100.00716.54
7.2.300.0090.00916.46
7.2.290.0140.00316.77
7.2.260.0120.00615.21
7.2.250.0100.00615.18
7.2.240.0090.00915.18
7.2.230.0040.00815.17
7.2.220.0040.01015.04
7.2.210.0050.00615.16
7.2.200.0030.01115.08
7.2.190.0090.00715.15
7.2.180.0060.01015.08
7.2.170.0050.01015.09
7.2.160.0080.00915.15
7.2.150.0050.00816.83
7.2.140.0090.00916.96
7.2.130.0070.00916.70
7.2.120.0060.00916.83
7.2.110.0100.00616.58
7.2.100.0070.00916.67
7.2.90.0070.00916.76
7.2.80.0070.00916.87
7.2.70.0090.00916.92
7.2.60.0110.00916.87
7.2.50.0080.00916.82
7.2.40.0070.00816.85
7.2.30.0050.01116.86
7.2.20.0080.00816.68
7.2.10.0080.00716.74
7.2.00.0070.00917.28
7.1.330.0060.01015.73
7.1.320.0060.00815.74
7.1.310.0040.00815.71
7.1.300.0030.01115.72
7.1.290.0110.00515.75
7.1.280.0050.00915.70
7.1.270.0050.00915.74
7.1.260.0060.00815.71
7.1.250.0090.00515.51
7.1.240.0090.00715.55
7.1.230.0090.00515.67
7.1.220.0080.00815.84
7.1.210.0110.00415.56
7.1.200.0090.00615.88
7.1.190.0050.00815.86
7.1.180.0070.00715.89
7.1.170.0070.00715.78
7.1.160.0080.00315.76
7.1.150.0040.00915.85
7.1.140.0060.00515.72
7.1.130.0030.00915.81
7.1.120.0050.00715.84
7.1.110.0050.00615.88
7.1.100.0030.00715.64
7.1.90.0030.01315.84
7.1.80.0090.00715.71
7.1.70.0050.00616.24
7.1.60.0080.00616.96
7.1.50.0060.01116.17
7.1.40.0020.01215.91
7.1.30.0040.00915.64
7.1.20.0040.01015.80
7.1.10.0060.00815.81
7.1.00.0030.01917.95
7.0.330.0030.01015.39
7.0.320.0070.00515.30
7.0.310.0040.01015.44
7.0.300.0050.00815.24
7.0.290.0060.00715.47
7.0.280.0030.00815.36
7.0.270.0050.00715.40
7.0.260.0050.00915.31
7.0.250.0050.00615.35
7.0.240.0020.01115.47
7.0.230.0070.00715.49
7.0.220.0040.01115.48
7.0.210.0040.00815.32
7.0.200.0020.00915.87
7.0.190.0050.00915.43
7.0.180.0030.01015.38
7.0.170.0050.00915.32
7.0.160.0110.00315.48
7.0.150.0060.00515.46
7.0.140.0070.02417.60
7.0.130.0030.00615.57
7.0.120.0070.01217.65
7.0.110.0050.00815.24
7.0.100.0050.00815.43
7.0.90.0040.00915.40
7.0.80.0040.00715.45
7.0.70.0070.00615.31
7.0.60.0050.03316.92
7.0.50.0050.01616.28
7.0.40.0040.01714.95
7.0.30.0050.01814.87
7.0.20.0040.02014.89
7.0.10.0080.02614.95
7.0.00.0060.03014.91
5.6.400.0070.00914.26
5.6.390.0090.00414.35
5.6.380.0120.00314.37
5.6.370.0030.01214.48
5.6.360.0090.00414.65
5.6.350.0050.00914.37
5.6.340.0090.00514.22
5.6.330.0080.00514.44
5.6.320.0050.00614.09
5.6.310.0070.00714.53
5.6.300.0060.00814.56
5.6.290.0020.00914.36
5.6.280.0040.03016.51
5.6.270.0100.00414.38
5.6.260.0030.01214.49
5.6.250.0060.00914.59
5.6.240.0060.00814.43
5.6.230.0070.00714.36
5.6.220.0050.00914.36
5.6.210.0060.02316.47
5.6.200.0070.01715.61
5.6.190.0030.02115.62
5.6.180.0060.01815.57
5.6.170.0060.01815.73
5.6.160.0060.02415.60
5.6.150.0010.03215.72
5.6.140.0060.03015.55
5.6.130.0040.02515.59
5.6.120.0080.02815.60
5.6.110.0030.02815.70
5.6.100.0040.03215.57
5.6.90.0130.02115.69
5.6.80.0030.02315.29
5.6.70.0060.02015.46
5.6.60.0110.02615.27
5.6.50.0030.02215.33
5.6.40.0060.03215.40
5.6.30.0060.02215.26
5.6.20.0080.01815.43
5.6.10.0040.02115.42
5.6.00.0030.02415.31
5.5.380.0030.00914.31
5.5.370.0040.01114.32
5.5.360.0050.00714.12
5.5.350.0060.02716.30
5.5.340.0060.02115.59
5.5.330.0060.01715.44
5.5.320.0040.01915.71
5.5.310.0040.01815.49
5.5.300.0030.02315.53
5.5.290.0030.02615.64
5.5.280.0030.03215.63
5.5.270.0050.03115.51
5.5.260.0070.02915.67
5.5.250.0090.01715.39
5.5.240.0070.02615.28
5.5.230.0070.02315.12
5.5.220.0090.02915.32
5.5.210.0090.02915.28
5.5.200.0100.02715.13
5.5.190.0020.02015.27
5.5.180.0070.02815.39
5.5.170.0040.00814.22
5.5.160.0060.02715.15
5.5.150.0030.02215.35
5.5.140.0100.02615.31
5.5.130.0080.01615.15
5.5.120.0060.03015.25
5.5.110.0040.03115.23
5.5.100.0060.02815.10
5.5.90.0040.02715.26
5.5.80.0090.02915.25
5.5.70.0070.02515.33
5.5.60.0060.02215.36
5.5.50.0040.03415.25
5.5.40.0060.02815.25
5.5.30.0090.02815.20
5.5.20.0060.03115.17
5.5.10.0060.02715.34
5.5.00.0110.02715.06
5.4.450.0070.02314.57
5.4.440.0070.02714.58
5.4.430.0070.02714.52
5.4.420.0050.03114.64
5.4.410.0020.02614.49
5.4.400.0010.03014.36
5.4.390.0050.03014.50
5.4.380.0020.02114.44
5.4.370.0030.02814.34
5.4.360.0040.02914.39
5.4.350.0060.02814.42
5.4.340.0020.02814.50
5.4.330.0050.00312.10
5.4.320.0040.03214.44
5.4.310.0040.02614.32
5.4.300.0040.03014.33
5.4.290.0100.02014.29
5.4.280.0060.02014.38
5.4.270.0030.01914.45
5.4.260.0000.02614.46
5.4.250.0020.02914.34
5.4.240.0040.01914.45
5.4.230.0060.02714.32
5.4.220.0040.03114.28
5.4.210.0040.02914.32
5.4.200.0060.01914.38
5.4.190.0030.02414.40
5.4.180.0040.03014.39
5.4.170.0030.03014.38
5.4.160.0010.02014.49
5.4.150.0040.01714.45
5.4.140.0030.01813.52
5.4.130.0060.02113.57
5.4.120.0060.02513.53
5.4.110.0060.01913.51
5.4.100.0020.02013.66
5.4.90.0060.01613.55
5.4.80.0020.02813.44
5.4.70.0050.02513.57
5.4.60.0060.02813.52
5.4.50.0040.01713.51
5.4.40.0010.02513.63
5.4.30.0040.01613.48
5.4.20.0010.03013.59
5.4.10.0030.02513.54
5.4.00.0020.02913.33
5.3.290.0030.01812.88
5.3.280.0050.01412.82
5.3.270.0050.02912.79
5.3.260.0070.01912.83
5.3.250.0010.03012.82
5.3.240.0020.03012.82
5.3.230.0010.03012.75
5.3.220.0030.01712.75
5.3.210.0090.02412.75
5.3.200.0010.02212.81
5.3.190.0020.02612.80
5.3.180.0080.02612.81
5.3.170.0100.02612.79
5.3.160.0090.01912.80
5.3.150.0050.02012.76
5.3.140.0050.02512.75
5.3.130.0040.03212.80
5.3.120.0010.02912.80
5.3.110.0030.03012.79
5.3.100.0050.02112.59
5.3.90.0030.02812.63
5.3.80.0050.02212.63
5.3.70.0020.02612.61
5.3.60.0070.02212.58
5.3.50.0050.01612.59
5.3.40.0050.02612.59
5.3.30.0030.02612.59
5.3.20.0020.02712.45
5.3.10.0030.02712.50
5.3.00.0020.02012.43
5.2.170.0100.04711.08
5.2.160.0100.06011.13
5.2.150.0030.06711.11
5.2.140.0030.04711.08
5.2.130.0000.03711.09
5.2.120.0030.04010.92
5.2.110.0030.06011.08
5.2.100.0030.06311.13
5.2.90.0000.06311.04
5.2.80.0000.05010.87
5.2.70.0030.06311.01
5.2.60.0130.05311.05
5.2.50.0030.06711.01
5.2.40.0100.04310.97
5.2.30.0000.04710.75
5.2.20.0070.03010.92
5.2.10.0000.05010.70
5.2.00.0100.05710.70
5.1.60.0100.0409.95
5.1.50.0100.04310.07
5.1.40.0030.0379.95
5.1.30.0070.03310.28
5.1.20.0000.05310.35
5.1.10.0070.03010.04
5.1.00.0100.05010.07
5.0.50.0030.0308.51
5.0.40.0000.0378.32
5.0.30.0030.0638.28
5.0.20.0070.0408.23
5.0.10.0030.0438.25
5.0.00.0030.0437.98
4.4.90.0070.0237.74
4.4.80.0030.0337.74
4.4.70.0000.0377.74
4.4.60.0070.0307.74
4.4.50.0030.0307.74
4.4.40.0070.0407.74
4.4.30.0000.0377.74
4.4.20.0000.0337.74
4.4.10.0000.0407.74
4.4.00.0030.0537.74
4.3.110.0070.0137.74
4.3.100.0030.0237.74
4.3.90.0030.0207.74
4.3.80.0100.0407.74
4.3.70.0030.0137.74
4.3.60.0030.0137.74
4.3.50.0030.0337.74
4.3.40.0000.0277.74
4.3.30.0000.0307.74
4.3.20.0000.0207.74
4.3.10.0000.0377.74
4.3.00.0000.0237.74

preferences:
47.21 ms | 400 KiB | 5 Q