3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a{ public function __toString() { $debug = debug_backtrace(); echo "__toString called on line ".$debug['0']['line']."\n"; return ""; } } function string_param(string $a){ } function object_param(object $a){ echo $a; //here (string)$a; //here $a == "0"; //here string_param($a); //here ?><?= $a; ?><?php //here } $a = new a(); $a == "0"; //here string_param($a); //here object_param($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.5.30.0050.01319.25
8.5.20.0080.00619.36
8.5.10.0140.00621.36
8.5.00.0120.01120.08
8.4.180.0140.00819.55
8.4.170.0140.00720.55
8.4.160.0120.00921.38
8.4.150.0070.00516.85
8.4.140.0150.00717.52
8.4.130.0080.00217.66
8.4.120.0070.00524.08
8.4.110.0050.00422.57
8.4.100.0100.01018.75
8.4.90.0110.00918.91
8.4.80.0090.00420.46
8.4.70.0150.00717.93
8.4.60.0100.00619.08
8.4.50.0130.00818.84
8.4.40.0160.00319.27
8.4.30.0160.00720.61
8.4.20.0040.00720.62
8.4.10.0100.01019.54
8.3.300.0120.00818.50
8.3.290.0090.01122.57
8.3.280.0150.00818.36
8.3.270.0110.00916.48
8.3.260.0100.00916.30
8.3.250.0050.00419.02
8.3.240.0120.00717.03
8.3.230.0090.01016.82
8.3.220.0120.00618.96
8.3.210.0080.00718.34
8.3.200.0070.00216.47
8.3.190.0070.01217.18
8.3.180.0090.01017.30
8.3.170.0090.00920.63
8.3.160.0110.00718.95
8.3.150.0180.00020.56
8.3.140.0080.00016.69
8.3.130.0110.00017.23
8.3.120.0060.00318.98
8.3.110.0080.00016.50
8.3.100.0080.00016.41
8.3.90.0120.00316.59
8.3.80.0060.00317.97
8.3.70.0100.01016.50
8.3.60.0090.00618.30
8.3.50.0050.00818.50
8.3.40.0100.01018.83
8.3.30.0140.00018.58
8.3.20.0040.00420.89
8.3.10.0040.00423.51
8.3.00.0050.00220.67
8.2.300.0100.01022.17
8.2.290.0110.00820.50
8.2.280.0120.00820.04
8.2.270.0040.01417.20
8.2.260.0110.00718.30
8.2.250.0040.00418.29
8.2.240.0090.00016.38
8.2.230.0000.00920.94
8.2.220.0030.00724.06
8.2.210.0050.00326.77
8.2.200.0050.00518.16
8.2.190.0070.01116.63
8.2.180.0110.00718.38
8.2.170.0140.00022.96
8.2.160.0030.01221.20
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0080.00020.38
8.2.100.0110.00017.84
8.2.90.0000.00817.97
8.2.80.0040.00417.97
8.2.70.0050.00517.75
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0040.00419.95
8.2.30.0040.00418.01
8.2.20.0000.00718.18
8.2.10.0080.00018.81
8.2.00.0000.00819.31
8.1.340.0120.00917.68
8.1.330.0050.00322.12
8.1.320.0150.00716.21
8.1.310.0040.00416.49
8.1.300.0120.00315.87
8.1.290.0030.00618.88
8.1.280.0080.00825.92
8.1.270.0070.00020.31
8.1.260.0050.00226.35
8.1.250.0030.00528.09
8.1.240.0090.00920.61
8.1.230.0070.00422.69
8.1.220.0040.00417.74
8.1.210.0080.00018.97
8.1.200.0030.00617.36
8.1.190.0030.00617.23
8.1.180.0070.00018.10
8.1.170.0080.00018.61
8.1.160.0070.00018.82
8.1.150.0070.00018.85
8.1.140.0040.00418.95
8.1.130.0040.00820.10
8.1.120.0040.00417.39
8.1.110.0090.00017.34
8.1.100.0000.00717.42
8.1.90.0040.00417.29
8.1.80.0000.00717.35
8.1.70.0030.00317.46
8.1.60.0080.00317.55
8.1.50.0070.00317.48
8.1.40.0060.00317.47
8.1.30.0040.00717.55
8.1.20.0000.00917.48
8.1.10.0090.00017.54
8.1.00.0000.00817.42
8.0.300.0070.00019.92
8.0.290.0070.00016.62
8.0.280.0000.00718.41
8.0.270.0060.00317.24
8.0.260.0000.00619.98
8.0.250.0070.00017.03
8.0.240.0000.00716.91
8.0.230.0050.00216.90
8.0.220.0030.00316.82
8.0.210.0030.00316.93
8.0.200.0030.00317.05
8.0.190.0000.00816.97
8.0.180.0080.00016.91
8.0.170.0050.00316.93
8.0.160.0040.00416.95
8.0.150.0050.00216.75
8.0.140.0000.00816.88
8.0.130.0030.00313.36
8.0.120.0040.00416.85
8.0.110.0000.00716.73
8.0.100.0040.00416.85
8.0.90.0090.00017.02
8.0.80.0140.00016.92
8.0.70.0000.00716.96
8.0.60.0050.00216.94
8.0.50.0000.00716.83
8.0.30.0170.00716.83
8.0.20.0100.00817.30
8.0.10.0040.00417.14
8.0.00.0060.01416.71
7.4.330.0000.00515.55
7.4.320.0040.00416.43
7.4.300.0020.00516.59
7.4.290.0000.00816.49
7.4.280.0050.00316.41
7.4.270.0070.00016.53
7.4.260.0030.00313.21
7.4.250.0000.00716.57
7.4.240.0030.00516.60
7.4.230.0070.00016.48
7.4.220.0030.00316.64
7.4.210.0070.00916.57
7.4.200.0000.00716.38
7.4.130.0040.01516.47
7.4.120.0040.01216.43
7.4.110.0060.01116.61
7.4.100.0130.00916.44
7.4.90.0080.00816.44
7.4.80.0120.00919.39
7.4.70.0130.00316.63
7.4.60.0100.00616.41
7.4.50.0150.00016.42
7.4.40.0080.00816.64
7.4.00.0070.01015.08
7.3.330.0040.00416.26
7.3.320.0030.00313.36
7.3.310.0000.00816.35
7.3.300.0000.00716.36
7.3.290.0070.00016.37
7.3.260.0110.00716.52
7.3.240.0080.01016.63
7.3.230.0030.01416.43
7.3.210.0060.01316.34
7.3.200.0110.00716.36
7.3.190.0040.01916.61
7.3.180.0090.01316.43
7.3.170.0060.01316.42
7.3.160.0040.01216.36
7.3.120.0110.00715.04
7.3.110.0090.00614.95
7.3.100.0070.00515.05
7.3.90.0090.00514.74
7.3.80.0050.00714.88
7.3.70.0060.00814.79
7.3.60.0030.01014.53
7.3.50.0040.01414.82
7.3.40.0060.00914.84
7.3.30.0070.00914.93
7.3.20.0030.01415.64
7.3.10.0090.00915.78
7.3.00.0060.00815.70
7.2.330.0060.01316.55
7.2.320.0000.02316.84
7.2.310.0080.00816.75
7.2.300.0160.00616.43
7.2.290.0060.01116.64
7.2.250.0060.01214.87
7.2.240.0110.01015.07
7.2.230.0030.01215.13
7.2.220.0060.00814.97
7.2.210.0040.00915.16
7.2.200.0030.01115.00
7.2.190.0070.00915.12
7.2.180.0070.00815.07
7.2.170.0060.00815.05
7.2.160.0070.01014.82
7.2.150.0090.01214.94
7.2.140.0070.01015.08
7.2.130.0120.00415.08
7.2.120.0220.00914.99
7.2.110.0060.00915.11
7.2.100.0030.01315.12
7.2.90.0100.00615.13
7.2.80.0080.00614.82
7.2.70.0040.01115.21
7.2.60.0090.00614.99
7.2.50.0090.00614.79
7.2.40.0060.00915.11
7.2.30.0150.00015.10
7.2.20.0040.01115.15
7.2.10.0040.01114.84
7.2.00.0040.01115.12
7.1.330.0070.01014.91
7.1.320.0050.00914.93
7.1.310.0020.01114.87
7.1.300.0060.00814.87
7.1.290.0120.00314.68
7.1.280.0080.00414.95
7.1.270.0050.01114.79
7.1.260.0080.00814.65
7.1.250.0030.01013.94

preferences:
33.23 ms | 475 KiB | 5 Q