3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public function foo() { echo 'Do foo job'; } } class Cabelo extends Person { public function foo() { echo 'Do Cabelo foo job'; } } $cabelo = new Cabelo; $result = $cabelo instanceof Person; echo 'instanceof result: ' . var_dump($result) . PHP_EOL; $className = get_class($cabelo); $result2 = $className == 'Person'; echo 'get_classe result: ' . var_dump($result2) . PHP_EOL;

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.0070.00716.36
8.3.50.0110.00922.04
8.3.40.0100.00318.84
8.3.30.0000.01418.96
8.3.20.0080.00020.34
8.3.10.0000.00821.77
8.3.00.0080.00019.26
8.2.180.0170.00718.41
8.2.170.0180.00318.75
8.2.160.0120.00622.96
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0080.00019.26
8.2.110.0100.00019.30
8.2.100.0040.00717.72
8.2.90.0000.00819.05
8.2.80.0030.00517.97
8.2.70.0030.00717.38
8.2.60.0030.00517.91
8.2.50.0080.00018.07
8.2.40.0000.00819.41
8.2.30.0000.00717.94
8.2.20.0080.00017.68
8.2.10.0030.00518.16
8.2.00.0000.00817.73
8.1.280.0090.00625.92
8.1.270.0030.00618.90
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0090.00019.44
8.1.230.0120.00021.05
8.1.220.0030.00617.80
8.1.210.0080.00018.77
8.1.200.0000.00917.23
8.1.190.0040.00817.12
8.1.180.0040.00418.10
8.1.170.0000.00818.42
8.1.160.0020.00521.93
8.1.150.0050.00318.80
8.1.140.0040.00417.32
8.1.130.0030.00517.74
8.1.120.0000.00817.36
8.1.110.0070.00017.36
8.1.100.0000.00717.44
8.1.90.0020.00517.39
8.1.80.0000.00717.35
8.1.70.0030.00317.43
8.1.60.0040.00417.58
8.1.50.0060.00317.40
8.1.40.0040.00417.53
8.1.30.0040.00417.69
8.1.20.0000.00817.48
8.1.10.0040.00417.57
8.1.00.0060.00317.37
8.0.300.0030.00618.77
8.0.290.0070.00016.63
8.0.280.0080.00018.50
8.0.270.0030.00316.86
8.0.260.0030.00518.36
8.0.250.0030.00316.97
8.0.240.0000.00716.93
8.0.230.0030.00316.84
8.0.220.0030.00316.75
8.0.210.0000.00716.90
8.0.200.0000.00616.96
8.0.190.0090.00016.85
8.0.180.0000.00816.88
8.0.170.0030.00616.80
8.0.160.0060.00316.80
8.0.150.0070.00016.88
8.0.140.0040.00416.88
8.0.130.0040.00413.32
8.0.120.0040.00416.74
8.0.110.0050.00316.80
8.0.100.0040.00416.73
8.0.90.0040.00416.92
8.0.80.0000.01716.95
8.0.70.0000.00716.71
8.0.60.0080.00016.76
8.0.50.0040.00416.91
8.0.30.0160.01116.95
8.0.20.0050.01517.40
8.0.10.0070.00016.83
8.0.00.0120.00716.93
7.4.330.0000.00615.09
7.4.320.0000.00616.37
7.4.300.0030.00316.59
7.4.290.0000.00716.52
7.4.280.0000.01016.48
7.4.270.0030.00316.60
7.4.260.0100.00016.60
7.4.250.0040.00416.48
7.4.240.0050.00216.50
7.4.230.0000.00816.58
7.4.220.0060.01216.46
7.4.210.0060.00916.57
7.4.200.0070.00016.30
7.4.160.0040.01616.51
7.4.150.0060.01317.40
7.4.140.0120.00717.86
7.4.130.0120.00916.62
7.4.120.0090.01116.61
7.4.110.0070.01016.57
7.4.100.0090.01516.48
7.4.90.0090.00816.52
7.4.80.0060.01219.39
7.4.70.0040.01116.56
7.4.60.0190.02216.58
7.4.50.0030.00516.42
7.4.40.0120.00316.45
7.4.30.0090.00916.53
7.4.00.0100.00714.78
7.3.330.0000.00613.35
7.3.320.0110.00413.32
7.3.310.0050.00216.41
7.3.300.0030.00316.36
7.3.290.0110.00616.33
7.3.280.0090.01016.39
7.3.270.0100.01317.40
7.3.260.0080.00816.61
7.3.250.0100.01116.45
7.3.240.0070.01016.58
7.3.230.0120.01216.64
7.3.210.0060.01216.30
7.3.200.0090.00619.39
7.3.190.0080.00816.59
7.3.180.0030.01316.47
7.3.170.0090.00916.37
7.3.160.0090.01216.47
7.3.10.0070.01016.87
7.3.00.0100.00316.73
7.2.330.0070.01716.43
7.2.320.0130.00316.79
7.2.310.0030.01316.43
7.2.300.0140.00316.79
7.2.290.0090.01316.88
7.2.130.0070.00716.91
7.2.120.0040.01116.97
7.2.110.0070.00717.05
7.2.100.0090.00616.85
7.2.90.0090.00616.89
7.2.80.0100.00616.82
7.2.70.0070.01116.81
7.2.60.0090.00416.93
7.2.50.0060.01217.03
7.2.40.0030.00617.00
7.2.30.0030.00716.73
7.2.20.0030.01216.98
7.2.10.0090.00616.95
7.2.00.0030.01018.16
7.1.250.0000.01115.91
7.1.240.0080.00615.79
7.1.230.0070.01015.52
7.1.220.0090.00615.76
7.1.210.0040.00815.89
7.1.200.0080.00315.73
7.1.190.0070.01015.88
7.1.180.0040.01115.91
7.1.170.0060.01215.77
7.1.160.0040.01215.80
7.1.150.0000.01415.79
7.1.140.0030.01115.74
7.1.130.0030.00715.68
7.1.120.0000.01315.70
7.1.110.0060.00315.93
7.1.100.0060.00717.07
7.1.90.0100.00315.78
7.1.80.0030.01016.03
7.1.70.0000.00816.53
7.1.60.0050.01117.57
7.1.50.0120.00816.49
7.1.40.0030.01015.57
7.1.30.0070.00415.62
7.1.20.0030.01015.24
7.1.10.0030.00915.70
7.1.00.0050.04118.95
7.0.330.0070.01015.29
7.0.320.0060.00615.22
7.0.310.0040.01115.62
7.0.300.0030.01015.04
7.0.290.0120.00015.33
7.0.280.0030.00915.31
7.0.270.0000.01215.20
7.0.260.0070.00715.27
7.0.250.0030.00615.33
7.0.240.0080.00415.42
7.0.230.0060.00915.44
7.0.220.0040.00815.15
7.0.210.0030.00915.61
7.0.200.0090.00615.07
7.0.190.0040.00415.42
7.0.180.0000.01015.49
7.0.170.0040.00715.13
7.0.160.0000.01415.14
7.0.150.0040.00814.98
7.0.140.0030.04218.61
7.0.130.0000.01115.39
7.0.120.0050.00815.04
7.0.110.0030.00615.28
7.0.100.0030.00815.25
7.0.90.0000.01415.55
7.0.80.0070.00415.48
7.0.70.0000.00815.49
7.0.60.0020.04117.75
7.0.50.0080.02816.73
7.0.40.0100.04016.64
7.0.30.0080.02916.74
7.0.20.0190.03716.64
7.0.10.0190.04516.79
7.0.00.0050.04416.68
5.6.380.0030.01214.01
5.6.370.0030.00814.12
5.6.360.0110.00314.51
5.6.350.0030.00914.10
5.6.340.0040.01113.98
5.6.330.0040.01114.52
5.6.320.0090.00314.55
5.6.310.0040.00814.18
5.6.300.0040.00314.53
5.6.290.0060.00914.23
5.6.280.0070.03717.59
5.6.270.0080.00414.29
5.6.260.0030.00614.47
5.6.250.0030.00614.21
5.6.240.0030.01214.28
5.6.230.0070.00414.25
5.6.220.0100.00314.13
5.6.210.0130.03717.49
5.6.200.0070.04416.23
5.6.190.0090.04717.27
5.6.180.0120.02717.42
5.6.170.0170.04017.33
5.6.160.0050.03717.17
5.6.150.0120.03516.15
5.6.140.0070.04316.24
5.6.130.0000.02716.08
5.6.120.0030.02817.64
5.6.110.0090.02417.64
5.6.100.0030.04617.74
5.6.90.0130.03617.68
5.6.80.0070.03117.37
5.6.70.0100.03217.33
5.6.60.0000.01414.33
5.6.50.0030.00614.19
5.6.40.0080.00414.23
5.6.30.0040.00814.12
5.6.20.0070.00714.34
5.6.10.0040.00414.00
5.6.00.0030.01014.29
5.5.380.0030.00310.91
5.5.370.0070.00311.26
5.5.360.0120.00010.99
5.5.350.0170.04015.75
5.5.340.0070.03214.48
5.5.330.0100.04215.75
5.5.320.0020.02715.69
5.5.310.0170.04015.73
5.5.300.0050.03714.52
5.5.290.0030.04314.57
5.5.280.0050.02215.92
5.5.270.0110.03216.01
5.5.260.0020.04316.02
5.5.250.0030.04216.00
5.5.240.0080.04515.61
5.5.230.0000.01111.18
5.5.220.0000.01111.30
5.5.210.0030.00711.12
5.5.200.0000.01011.26
5.5.190.0080.00311.34
5.5.180.0030.00610.96
5.5.170.0000.00510.91
5.5.160.0080.00311.15
5.5.150.0000.01210.97
5.5.140.0000.00711.12
5.5.130.0060.00610.60
5.5.120.0060.00311.16
5.5.110.0030.00311.09
5.5.100.0000.01311.26
5.5.90.0100.00311.11
5.5.80.0120.00010.63
5.5.70.0080.00410.96
5.5.60.0040.00811.27
5.5.50.0040.00310.93
5.5.40.0060.00610.64
5.5.30.0000.01211.13
5.5.20.0000.01010.71
5.5.10.0000.00810.67
5.5.00.0030.00711.08
5.4.450.0200.03015.35
5.4.440.0530.02815.36
5.4.430.0180.03315.34
5.4.420.0480.03015.26
5.4.410.0130.02614.94
5.4.400.0150.03514.85
5.4.390.0200.03114.92
5.4.380.0170.03214.88
5.4.370.0110.03014.81
5.4.360.0170.03214.91
5.4.350.0170.03514.84
5.4.340.0230.03314.78
5.4.330.0000.01311.14
5.4.320.0230.03114.79
5.4.310.0200.03214.75
5.4.300.0220.03514.98
5.4.290.0200.03414.99
5.4.280.0250.03614.77
5.4.270.0370.04014.93
5.4.260.0280.03514.94
5.4.250.0270.02414.76
5.4.240.0210.03814.99
5.4.230.0250.03514.94
5.4.220.0250.03114.79
5.4.210.0340.03214.75
5.4.200.0270.03513.77
5.4.190.0200.02714.89
5.4.180.0260.03514.93
5.4.170.0230.03014.67
5.4.160.0220.03014.82
5.4.150.0300.02614.69
5.4.140.0200.03013.62
5.4.130.0230.03513.82
5.4.120.0240.03413.66
5.4.110.0230.02513.66
5.4.100.0150.04013.77
5.4.90.0270.03713.53
5.4.80.0180.03313.76
5.4.70.0260.03013.59
5.4.60.0240.02913.66
5.4.50.0250.03713.53
5.4.40.0250.02613.57
5.4.30.0230.03013.57
5.4.20.0160.02813.68
5.4.10.0250.03613.61
5.4.00.0280.03613.34
5.3.290.0250.03712.82
5.3.280.0200.04212.48
5.3.270.0230.04212.65
5.3.260.0200.03212.65
5.3.250.0270.02812.62
5.3.240.0290.02612.54
5.3.230.0170.02912.62
5.3.220.0220.03112.57
5.3.210.0180.02912.36
5.3.200.0240.02412.49
5.3.190.0180.03112.53
5.3.180.0300.03312.69
5.3.170.0290.03012.67
5.3.160.0200.03012.63
5.3.150.0270.02612.50
5.3.140.0250.03712.52
5.3.130.0220.02812.58
5.3.120.0180.03312.46
5.3.110.0260.02612.65
5.3.100.0170.03512.31
5.3.90.0100.03812.37
5.3.80.0180.03312.23
5.3.70.0280.03212.24
5.3.60.0320.03112.21
5.3.50.0260.03312.21
5.3.40.0180.02812.15
5.3.30.0260.02612.12
5.3.20.0300.02211.97
5.3.10.0250.04011.89
5.3.00.0150.03512.02
5.2.170.0070.03210.60
5.2.160.0230.03310.58
5.2.150.0130.02410.58
5.2.140.0230.02610.57
5.2.130.0230.03010.59
5.2.120.0180.02710.55
5.2.110.0150.02610.55
5.2.100.0320.02510.60
5.2.90.0180.03010.56
5.2.80.0170.03210.53
5.2.70.0170.02810.55
5.2.60.0120.03510.56
5.2.50.0220.03110.51
5.2.40.0130.03210.59
5.2.30.0130.03210.52
5.2.20.0120.02510.47
5.2.10.0180.02810.42
5.2.00.0230.02510.45
5.1.60.0140.01910.00
5.1.50.0220.01710.03
5.1.40.0100.0239.99
5.1.30.0150.03010.17
5.1.20.0190.01810.21
5.1.10.0100.02710.04
5.1.00.0150.02510.08
5.0.50.0080.0199.31
5.0.40.0130.0159.21
5.0.30.0080.0339.11
5.0.20.0080.0219.13
5.0.10.0050.0249.10
5.0.00.0050.0279.08
4.4.90.0100.0137.93
4.4.80.0050.0187.93
4.4.70.0090.0137.93
4.4.60.0110.0127.92
4.4.50.0110.0117.95
4.4.40.0110.0237.98
4.4.30.0140.0157.92
4.4.20.0090.0147.97
4.4.10.0070.0157.95
4.4.00.0070.0227.93
4.3.110.0050.0147.90
4.3.100.0090.0107.88
4.3.90.0050.0177.88
4.3.80.0070.0207.89
4.3.70.0020.0207.94
4.3.60.0120.0127.89
4.3.50.0050.0157.91
4.3.40.0120.0127.91
4.3.30.0000.0187.26
4.3.20.0070.0127.29
4.3.10.0030.0157.22
4.3.00.0080.0128.38

preferences:
52.19 ms | 401 KiB | 5 Q