3v4l.org

run code in 300+ PHP versions simultaneously
<?php class StringableClass{ public function __toString() { return __CLASS__; } } $obj = new StringableClass(); $str = (string)$obj; echo "cast: $str\n"; $str = settype($obj, 'string'); echo "settype: $str\n";

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.20.0090.01020.17
8.5.10.0060.01116.58
8.5.00.0160.00619.97
8.4.170.0150.01123.98
8.4.160.0110.01222.00
8.4.150.0030.00014.05
8.4.140.0060.01517.55
8.4.130.0180.00217.60
8.4.120.0060.00520.77
8.4.110.0060.00522.37
8.4.100.0170.00518.73
8.4.90.0140.00520.55
8.4.80.0180.00717.51
8.4.70.0150.00717.55
8.4.60.0170.00717.27
8.4.50.0180.00517.33
8.4.40.0200.00617.46
8.4.30.0180.00517.29
8.4.20.0210.00617.57
8.4.10.0180.00617.16
8.3.300.0130.00620.79
8.3.290.0080.01120.75
8.3.280.0110.00918.17
8.3.270.0140.00816.58
8.3.260.0110.00916.79
8.3.250.0100.00818.86
8.3.240.0110.00816.85
8.3.230.0050.00416.19
8.3.220.0210.00116.41
8.3.210.0180.00316.30
8.3.200.0160.00616.43
8.3.190.0160.00616.23
8.3.180.0180.00916.25
8.3.170.0200.00616.38
8.3.160.0180.00616.44
8.3.150.0190.00516.10
8.3.140.0190.00416.51
8.3.130.0150.00516.18
8.3.120.0170.00416.25
8.3.110.0160.00416.47
8.3.100.0200.00416.71
8.3.90.0200.00616.24
8.3.80.0200.00316.31
8.3.70.0150.00816.53
8.3.60.0170.00716.51
8.3.50.0200.00416.71
8.3.40.0200.00317.32
8.3.30.0150.00417.18
8.3.20.0160.00317.51
8.3.10.0150.00317.26
8.3.00.0090.00517.13
8.2.300.0110.00820.29
8.2.290.0170.00416.54
8.2.280.0130.00516.79
8.2.270.0160.00416.37
8.2.260.0200.00316.68
8.2.250.0150.00516.46
8.2.240.0160.00516.36
8.2.230.0160.00316.57
8.2.220.0170.00516.15
8.2.210.0150.00616.48
8.2.200.0150.00516.29
8.2.190.0150.00416.49
8.2.180.0150.00616.31
8.2.170.0150.00517.52
8.2.160.0170.00417.66
8.2.150.0170.00417.64
8.2.140.0150.00517.23
8.2.130.0170.00317.74
8.2.120.0160.00417.43
8.2.110.0170.00317.56
8.2.100.0160.00317.22
8.2.90.0150.00517.25
8.2.80.0140.00817.26
8.2.70.0150.00617.31
8.2.60.0160.00517.45
8.2.50.0170.00717.42
8.2.40.0190.00617.03
8.2.30.0130.00517.46
8.2.20.0150.00417.26
8.2.10.0160.00517.34
8.2.00.0190.00417.46
8.1.340.0100.01220.02

preferences:
48.86 ms | 403 KiB | 5 Q