3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { public function __toString() { return "Instances of B() can be treated as a strings!\n"; } } $b = new B(); print($b); //Instances of B() can be treated as a strings! print(is_string($b) ? 'true' : 'false'); //false

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.0170.00318.18
8.3.50.0150.00017.99
8.3.40.0070.01418.69
8.3.30.0120.00618.72
8.3.20.0040.00418.60
8.3.10.0050.00323.54
8.3.00.0000.00721.79
8.2.180.0110.00316.35
8.2.170.0040.01222.96
8.2.160.0130.00019.33
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0060.00319.76
8.2.120.0050.00326.35
8.2.110.0030.00721.00
8.2.100.0040.00817.78
8.2.90.0000.00818.03
8.2.80.0090.00017.97
8.2.70.0030.00517.80
8.2.60.0030.00518.16
8.2.50.0040.00418.10
8.2.40.0070.00019.34
8.2.30.0040.00420.53
8.2.20.0050.00318.05
8.2.10.0040.00417.93
8.2.00.0080.00019.30
8.1.280.0150.00025.92
8.1.270.0030.00520.70
8.1.260.0000.00926.35
8.1.250.0040.00428.09
8.1.240.0110.00020.55
8.1.230.0060.00620.89
8.1.220.0000.00817.74
8.1.210.0040.00418.94
8.1.200.0060.00317.23
8.1.190.0040.00417.22
8.1.180.0090.00018.10
8.1.170.0080.00018.72
8.1.160.0040.00418.86
8.1.150.0000.00718.89
8.1.140.0070.00020.67
8.1.130.0040.00420.15
8.1.120.0000.00817.36
8.1.110.0040.00417.34
8.1.100.0040.00417.29
8.1.90.0000.00717.47
8.1.80.0030.00317.33
8.1.70.0040.00717.37
8.1.60.0080.00017.48
8.1.50.0060.00317.46
8.1.40.0070.00017.51
8.1.30.0050.00317.65
8.1.20.0020.00517.61
8.1.10.0050.00217.48
8.1.00.0000.00717.37
8.0.300.0040.00419.98
8.0.290.0000.00916.58
8.0.280.0030.00318.44
8.0.270.0070.00017.25
8.0.260.0020.00520.06
8.0.250.0000.00916.95
8.0.240.0030.00616.89
8.0.230.0050.00316.83
8.0.220.0050.00316.88
8.0.210.0000.00716.77
8.0.200.0060.00016.93
8.0.190.0000.00717.00
8.0.180.0060.00916.80
8.0.170.0040.00416.79
8.0.160.0040.00416.78
8.0.150.0050.00216.94
8.0.140.0030.00416.86
8.0.130.0030.00313.31
8.0.120.0040.00416.85
8.0.110.0050.00316.87
8.0.100.0040.00416.75
8.0.90.0000.00716.77
8.0.80.0070.01016.89
8.0.70.0040.00416.81
8.0.60.0040.00416.91
8.0.50.0070.00016.78
8.0.30.0100.00817.07
8.0.20.0110.00817.40
8.0.10.0000.00816.88
8.0.00.0090.01016.83
7.4.330.0000.00515.55
7.4.320.0030.00316.44
7.4.300.0060.00016.60
7.4.290.0030.00316.49
7.4.280.0030.00616.60
7.4.270.0030.00716.59
7.4.260.0030.00316.48
7.4.250.0040.00416.55
7.4.240.0050.00216.61
7.4.230.0030.00316.30
7.4.220.0050.00316.59
7.4.210.0100.00616.61
7.4.200.0040.00416.30
7.4.160.0050.01116.38
7.4.140.0120.00917.86
7.4.130.0000.01716.67
7.4.120.0100.00916.44
7.4.110.0090.00616.48
7.4.100.0070.01416.56
7.4.90.0040.01216.53
7.4.80.0130.00319.39
7.4.70.0100.00716.50
7.4.60.0160.00316.57
7.4.50.0100.00616.33
7.4.40.0060.01016.31
7.4.00.0120.00314.80
7.3.330.0000.00513.10
7.3.320.0070.00013.17
7.3.310.0030.00316.34
7.3.300.0000.00716.26
7.3.290.0050.00316.27
7.3.280.0110.00516.23
7.3.260.0110.01016.41
7.3.240.0100.00916.30
7.3.230.0120.00416.28
7.3.210.0100.01116.54
7.3.200.0080.00816.18
7.3.190.0070.01416.49
7.3.180.0100.01016.53
7.3.170.0100.00716.43
7.3.160.0100.01316.49
7.3.120.0070.00714.54
7.3.110.0030.01415.07
7.3.100.0100.00714.75
7.3.90.0070.01014.91
7.3.80.0030.01314.71
7.3.70.0030.00914.57
7.3.60.0060.00614.70
7.3.50.0040.00414.84
7.3.40.0100.00314.63
7.3.30.0060.01114.69
7.3.20.0040.00716.41
7.3.10.0060.00816.74
7.3.00.0090.00316.50
7.2.330.0120.00616.44
7.2.320.0120.01316.64
7.2.310.0030.01516.50
7.2.300.0140.00616.47
7.2.290.0030.01316.58
7.2.240.0090.00615.02
7.2.230.0070.00714.96
7.2.220.0110.00014.97
7.2.210.0030.01314.73
7.2.200.0070.01014.66
7.2.190.0030.01015.06
7.2.180.0030.00614.76
7.2.170.0030.01315.09
7.2.160.0030.01014.90
7.2.150.0000.01816.96
7.2.140.0030.01216.91
7.2.130.0050.00616.79
7.2.120.0080.00516.86
7.2.110.0080.00716.71
7.2.100.0050.00916.85
7.2.90.1240.00916.13
7.2.80.0950.00716.05
7.2.70.0960.00616.24
7.2.60.1040.00516.29
7.2.50.1270.01016.21
7.2.40.1190.00915.89
7.2.30.1260.00716.07
7.2.20.1010.00816.28
7.2.10.0080.00816.19
7.2.00.0140.00716.05
7.1.330.0000.01315.64
7.1.320.0040.01115.98
7.1.310.0030.01015.85
7.1.300.0070.00715.74
7.1.290.0030.00615.35
7.1.280.0030.01015.71
7.1.270.0100.00315.40
7.1.260.0060.00915.73
7.1.250.0060.00815.50
7.1.210.4170.00713.46
7.1.200.2870.01313.70
7.1.190.2720.01013.61
7.1.180.3890.01013.71
7.1.170.2700.01013.81
7.1.160.2870.00313.45
7.1.150.3050.00013.71
7.1.140.4030.00713.72
7.1.130.0280.00913.66
7.1.120.1350.00013.85
7.1.110.3370.01013.70
7.1.100.3350.00613.55
7.1.90.3500.01013.25
7.1.80.4680.00013.34
7.1.70.3890.01013.71
7.1.60.4120.00731.48
7.1.50.5150.01031.61
7.1.40.4880.01331.46
7.1.30.3330.00031.51
7.1.20.4250.01631.64
7.1.10.5110.00313.45
7.1.00.3320.00313.78

preferences:
68.05 ms | 401 KiB | 5 Q