3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types = 1); class x { function __toString() : string { return "abc"; } } $x = new x; print $x . " and $x\n"; print $x; echo $x; echo PHP_EOL; print implode(', ', [$x, $x]); print implode($x, [1, 2]); ?>

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.60.0110.00816.89
8.5.50.0100.00918.48
8.5.30.0120.00719.36
8.5.20.0090.00819.98
8.5.10.0140.00716.45
8.5.00.0110.01120.04
8.4.210.0040.00519.66
8.4.180.0120.00925.64
8.4.170.0100.01223.71
8.4.160.0100.01323.93
8.4.150.0060.00616.81
8.4.140.0110.01017.71
8.4.130.0070.00917.91
8.4.120.0100.01022.36
8.4.110.0100.01022.48
8.4.100.0100.00917.90
8.4.90.0050.00417.98
8.4.80.0050.00417.75
8.4.70.0070.00518.03
8.4.60.0070.00120.44
8.4.50.0090.01020.53
8.4.40.0120.00817.90
8.4.30.0040.01518.48
8.4.20.0180.00419.70
8.4.10.0040.00419.49
8.3.300.0120.00920.72
8.3.290.0120.00818.61
8.3.280.0120.00818.49
8.3.270.0100.01016.48
8.3.260.0160.00216.45
8.3.250.0150.00318.97
8.3.240.0050.00316.81
8.3.230.0130.00616.80
8.3.220.0110.00717.02
8.3.210.0080.00316.84
8.3.200.0060.00316.67
8.3.190.0090.00717.21
8.3.180.0090.00916.41
8.3.170.0150.00320.93
8.3.160.0060.01316.97
8.3.150.0070.00017.00
8.3.140.0110.00716.51
8.3.130.0060.00318.56
8.3.120.0030.00618.79
8.3.110.0060.00320.94
8.3.100.0090.00016.73
8.3.90.0080.00026.77
8.3.80.0080.00317.97
8.3.70.0160.00616.75
8.3.60.0140.00318.48
8.3.50.0070.01116.55
8.3.40.0120.00321.86
8.3.30.0100.00720.35
8.3.20.0180.00421.94
8.3.10.0140.00721.85
8.3.00.0110.01119.14
8.2.300.0100.01118.77
8.2.290.0120.00720.53
8.2.280.0110.00818.56
8.2.270.0110.00720.34
8.2.260.0040.00416.63
8.2.250.0040.00418.51
8.2.240.0130.00616.83
8.2.230.0130.00322.58
8.2.220.0040.01124.06
8.2.210.0090.00926.77
8.2.200.0060.00618.41
8.2.190.0140.00716.58
8.2.180.0140.00716.75
8.2.170.0100.01019.10
8.2.160.0100.00622.96
8.2.150.0030.01519.26
8.2.140.0070.01420.16
8.2.130.0180.00020.38
8.2.120.0090.00919.35
8.2.110.0110.01119.34
8.2.100.0110.00719.02
8.2.90.0060.01219.05
8.2.80.0140.00719.40
8.2.70.0090.00618.59
8.2.60.0140.00318.51
8.2.50.0100.01018.85
8.2.40.0130.00618.95
8.2.30.0180.00418.71
8.2.20.0090.01218.65
8.2.10.0040.01418.82
8.2.00.0090.00918.82
8.1.340.0120.00819.94
8.1.330.0080.01122.05
8.1.320.0120.00716.07
8.1.310.0030.01019.91
8.1.300.0110.00716.65
8.1.290.0060.00330.84
8.1.280.0090.00925.92
8.1.270.0110.00722.06
8.1.260.0160.00322.00
8.1.250.0100.00722.19
8.1.240.0140.00418.61
8.1.230.0090.00918.30
8.1.220.0100.00718.89
8.1.210.0060.01318.52
8.1.200.0100.01018.73
8.1.190.0090.00918.44
8.1.180.0090.00618.55
8.1.170.0140.00018.64
8.1.160.0140.00418.58
8.1.150.0070.01418.72
8.1.140.0110.01118.47
8.1.130.0030.01318.69
8.1.120.0110.00418.67
8.1.110.0070.00718.68
8.1.100.0070.00718.50
8.1.90.0070.00718.55
8.1.80.0070.00719.86
8.1.70.0090.00618.63
8.1.60.0110.00318.68
8.1.50.0030.01318.51
8.1.40.0090.00618.60
8.1.30.0120.00318.72
8.1.20.0070.00718.69
8.1.10.0070.01118.74
8.1.00.0110.00718.64

preferences:
67 ms | 1023 KiB | 5 Q