3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { const TYPE = 'x'; } class Y { const TYPE = 'y'; } $y = new Y(); $x = new X(); $time = microtime(true); echo ($y::TYPE === 'y'); echo ($y::TYPE === 'x'); $time = microtime(true) - $time; echo '1 took '. $time; echo "\n"; $time = microtime(true); echo ($y instanceof Y); echo ($y instanceof X); $time = microtime(true) - $time; echo '2 took '. $time;

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)
7.4.10.0080.01014.88
7.4.00.0100.00714.92
7.3.130.0040.01114.64
7.3.120.0090.00714.79
7.3.110.0070.01114.66
7.3.100.0100.00714.71
7.3.90.0060.00914.87
7.3.80.0030.01114.88
7.3.70.0060.00814.81
7.3.60.0070.00814.83
7.3.50.0040.00814.61
7.3.40.0090.00314.54
7.3.30.0070.01014.79
7.3.20.0040.01015.82
7.3.10.0090.00515.74
7.3.00.0070.00715.60
7.2.260.0080.00815.09
7.2.250.0090.00815.13
7.2.240.0060.01115.02
7.2.230.0090.00915.03
7.2.220.0050.00915.34
7.2.210.0090.00714.86
7.2.200.0070.00914.88
7.2.190.0040.01214.96
7.2.180.0070.00915.13
7.2.170.0030.01314.89
7.2.160.0050.01015.02
7.2.150.0070.01016.13
7.2.140.0070.00816.00
7.2.130.0090.00716.04
7.2.120.0020.01315.84
7.2.110.0060.00915.98
7.2.100.0090.00415.93
7.2.90.0100.00415.90
7.2.80.0020.01415.99
7.2.70.0110.00515.97
7.2.60.0030.01516.02
7.2.50.0090.00915.94
7.2.40.0050.00816.05
7.2.30.0110.00416.07
7.2.20.0060.01015.87
7.2.10.0180.00816.10
7.2.00.0060.01217.07
7.1.330.0360.01014.99
7.1.320.0070.01214.95
7.1.310.0100.00514.92
7.1.300.0100.00614.79
7.1.290.0120.00214.84
7.1.280.0110.00614.92
7.1.270.0060.01414.76
7.1.260.0110.00514.91
7.1.250.0120.00714.86
7.1.240.0070.01314.88
7.1.230.0090.00714.87
7.1.220.0080.00814.85
7.1.210.0140.00714.98
7.1.200.0090.00914.84
7.1.190.0110.00714.72
7.1.180.0130.00714.83
7.1.170.0120.00514.92
7.1.160.0090.00914.94
7.1.150.0100.00714.93
7.1.140.0120.00614.89
7.1.130.0080.01214.86
7.1.120.0160.00614.88
7.1.110.0130.00614.84
7.1.100.0120.00714.91
7.1.90.0100.01015.03
7.1.80.0070.01114.75
7.1.70.0110.00515.76
7.1.60.0110.01116.30
7.1.50.0060.01315.55
7.1.40.0110.00614.72
7.1.30.0070.01614.88
7.1.20.0080.01115.02
7.1.10.0120.00614.88
7.1.00.0180.02717.48
7.0.330.0120.00814.45
7.0.320.0090.00714.53
7.0.310.0080.01114.37
7.0.300.0060.01014.39
7.0.290.0100.00814.43
7.0.280.0110.00614.33
7.0.270.0130.00514.56
7.0.260.0150.00114.52
7.0.250.0120.00614.40
7.0.240.0080.01014.49
7.0.230.0120.00614.43
7.0.220.0130.00414.62
7.0.210.0100.01014.58
7.0.200.0080.00815.27
7.0.190.0100.00614.66
7.0.180.0130.00714.46
7.0.170.0160.00214.48
7.0.160.0090.00914.41
7.0.150.0130.00614.52
7.0.140.0120.02717.14
7.0.130.0020.01214.45
7.0.120.0090.00714.63
7.0.110.0110.00714.47
7.0.100.0090.01214.54
7.0.90.0120.00514.62
7.0.80.0060.00814.43
7.0.70.0140.00414.63
7.0.60.0090.03416.24
7.0.50.0070.02515.62
7.0.40.0070.02115.73
7.0.30.0250.01715.80
7.0.20.0180.02115.78
7.0.10.0090.03415.82
7.0.00.0140.01915.68
5.6.400.0080.00714.35
5.6.390.0120.00414.17
5.6.380.0070.00814.58
5.6.370.0090.00814.28
5.6.360.0120.00814.10
5.6.350.0120.00614.54
5.6.340.0150.00414.26
5.6.330.0140.00514.34
5.6.320.0090.00714.40
5.6.310.0140.00514.41
5.6.300.0070.01114.46
5.6.290.0070.01514.22
5.6.280.0070.03216.34
5.6.270.0080.00914.40
5.6.260.0130.00414.40
5.6.250.0130.00914.39
5.6.240.0110.00614.19
5.6.230.0040.01314.23
5.6.220.0140.00714.39
5.6.210.0110.03316.52
5.6.200.0080.01915.75
5.6.190.0060.03516.43
5.6.180.0150.03116.43
5.6.170.0170.03216.39
5.6.160.0090.03016.45
5.6.150.0120.02615.54
5.6.140.0090.01915.49
5.6.130.0070.02015.59
5.6.120.0080.03516.60
5.6.110.0090.02916.43
5.6.100.0130.02216.43
5.6.90.0140.02916.45
5.6.80.0130.02816.31
5.6.70.1580.01616.28
5.6.60.0080.00914.15
5.6.50.0060.00614.41
5.6.40.0060.00914.25
5.6.30.0130.00514.24
5.6.20.0080.01114.27
5.6.10.0100.00714.35
5.6.00.0100.01014.18
5.5.380.0080.01014.35
5.5.370.0130.00514.25
5.5.360.0100.00814.29
5.5.350.0080.03216.36
5.5.340.0080.03415.50
5.5.330.0070.03316.15
5.5.320.0200.02216.28
5.5.310.0120.02316.30
5.5.300.0080.03415.45
5.5.290.0150.02515.57
5.5.280.0080.03316.39
5.5.270.0080.02516.52
5.5.260.0100.02916.52
5.5.250.0060.01916.35
5.5.240.0130.03416.22
5.5.230.0130.00614.23
5.5.220.0090.01014.33
5.5.210.0090.01114.15
5.5.200.0080.00914.21
5.5.190.0110.00514.06
5.5.180.0090.00614.37
5.5.170.0030.01314.02
5.5.160.0060.00914.13
5.5.150.0070.00714.37
5.5.140.0100.00613.99
5.5.130.0030.01114.34
5.5.120.0070.00814.23
5.5.110.0110.00514.15
5.5.100.0050.00814.09
5.5.90.0020.01314.16
5.5.80.0100.00514.05
5.5.70.0020.01314.21
5.5.60.0080.00814.13
5.5.50.0090.00914.03
5.5.40.0120.00514.07
5.5.30.0080.00814.35
5.5.20.0090.01114.17
5.5.10.0060.01214.22
5.5.00.0130.00513.91
5.4.450.0330.02414.98
5.4.440.0390.02114.83
5.4.430.0350.03114.91
5.4.420.0170.02514.92
5.4.410.0140.02514.84
5.4.400.0340.02614.75
5.4.390.0380.01714.75
5.4.380.0400.02514.84
5.4.370.0310.02214.81
5.4.360.0200.02214.85
5.4.350.0320.02314.84
5.4.340.0080.01512.43
5.4.330.0030.00912.64
5.4.320.0060.01912.59
5.4.310.0080.01612.59
5.4.300.0080.01512.59
5.4.290.0040.01812.59
5.4.280.0060.01512.56
5.4.270.0060.01512.56
5.4.260.0040.02112.56
5.4.250.0070.01612.55
5.4.240.0070.01612.56
5.4.230.0060.01512.55
5.4.220.0030.01912.55
5.4.210.0070.01712.55
5.4.200.0070.01612.55
5.4.190.0080.01512.55
5.4.180.0050.01812.55
5.4.170.0060.01512.56
5.4.160.0060.01512.55
5.4.150.0090.01212.55
5.4.140.0070.01612.45
5.4.130.0050.02112.44
5.4.120.0070.01712.43
5.4.110.0070.01712.43
5.4.100.0070.01612.43
5.4.90.0100.01412.43
5.4.80.0080.01412.43
5.4.70.0080.01412.43
5.4.60.0060.01512.43
5.4.50.0070.01512.43
5.4.40.0090.01612.42
5.4.30.0090.01712.42
5.4.20.0060.01612.42
5.4.10.0060.01412.42
5.4.00.0020.01712.25
5.3.290.0080.02112.75
5.3.280.0100.01912.71
5.3.270.0050.02712.71
5.3.260.0080.02212.71
5.3.250.0110.02212.71
5.3.240.0050.02412.71
5.3.230.0070.02412.71
5.3.220.0070.02612.69
5.3.210.0080.02012.69
5.3.200.0080.02112.69
5.3.190.0090.02012.69
5.3.180.0090.02212.69
5.3.170.0070.02112.69
5.3.160.0090.01912.69
5.3.150.0080.02112.69
5.3.140.0080.02212.68
5.3.130.0090.02112.68
5.3.120.0050.02312.68
5.3.110.0030.02412.68
5.3.100.0050.02012.41
5.3.90.0060.01912.40
5.3.80.0050.02112.40
5.3.70.0040.02112.39
5.3.60.0090.02112.39
5.3.50.0080.02612.36
5.3.40.0050.02012.36
5.3.30.0030.02212.34
5.3.20.0040.02212.23
5.3.10.0050.02112.21
5.3.00.0090.01812.21
5.2.170.0060.02110.96
5.2.160.0060.01710.96
5.2.150.0050.01910.96
5.2.140.0050.01910.96
5.2.130.0040.01810.94
5.2.120.0060.01610.94
5.2.110.0080.01510.94
5.2.100.0070.01510.94
5.2.90.0060.01610.94
5.2.80.0100.01410.94
5.2.70.0070.01610.94
5.2.60.0080.01910.92
5.2.50.0090.01510.90
5.2.40.0070.01910.89
5.2.30.0080.01510.88
5.2.20.0040.02110.87
5.2.10.0060.01510.82
5.2.00.0060.01710.76
5.1.60.0050.01510.40
5.1.50.0050.01410.39
5.1.40.0030.01710.38
5.1.30.0070.01310.56
5.1.20.0050.01510.57
5.1.10.0040.01610.44
5.1.00.0060.01410.43
5.0.50.0060.0129.67
5.0.40.0050.0129.60
5.0.30.0060.0169.51
5.0.20.0060.0099.49
5.0.10.0020.0149.48
5.0.00.0020.0209.47
4.4.90.0060.0078.74
4.4.80.0020.0118.73
4.4.70.0030.0098.73
4.4.60.0030.0108.73
4.4.50.0020.0148.74
4.4.40.0030.0198.71
4.4.30.0060.0098.73
4.4.20.0040.0088.77
4.4.10.0020.0118.78
4.4.00.0050.0138.73
4.3.110.0030.0108.69
4.3.100.0040.0088.68
4.3.90.0020.0118.67
4.3.80.0050.0138.64
4.3.70.0040.0088.67
4.3.60.0030.0098.66
4.3.50.0010.0118.66
4.3.40.0040.0138.62
4.3.30.0030.0098.00
4.3.20.0020.0117.99
4.3.10.0010.0117.97
4.3.00.0100.0129.84

preferences:
37.87 ms | 401 KiB | 5 Q