3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class toStr { private $str; public function __construct( $str ) { $this->str = $str; } public function __toString() { return $this->str; } } function strictly( string $str ) { return $str; } strictly( new toStr('hi'));

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.1.70.0000.00817.49
8.1.60.0050.00317.60
8.1.50.0040.00417.39
8.1.40.0050.00317.46
8.1.30.0080.00017.67
8.1.20.0080.00817.70
8.1.10.0050.00317.50
8.1.00.0070.00017.38
8.0.200.0000.00616.95
8.0.190.0040.00417.00
8.0.180.0000.00816.96
8.0.170.0090.00016.99
8.0.160.0000.00716.85
8.0.150.0070.00016.93
8.0.140.0040.00416.87
8.0.130.0060.00013.43
8.0.120.0030.00516.94
8.0.110.0080.00016.99
8.0.100.0080.00016.90
8.0.90.0040.00416.78
8.0.80.0040.01517.02
8.0.70.0020.00516.99
8.0.60.0040.00416.95
8.0.50.0000.00817.02
8.0.30.0140.00317.40
8.0.20.0120.00917.00
8.0.10.0040.00417.10
8.0.00.0120.01216.73
7.4.300.0030.00316.51
7.4.290.0030.00316.52
7.4.280.0030.00516.45
7.4.270.0000.00716.46
7.4.260.0040.00716.53
7.4.250.0000.00716.35
7.4.240.0070.00016.52
7.4.230.0030.00616.61
7.4.220.0000.00816.35
7.4.210.0070.00716.46
7.4.200.0070.00016.55
7.4.160.0110.00516.53
7.4.140.0100.01017.86
7.4.130.0130.00316.48
7.4.120.0150.00616.52
7.4.110.0030.01316.68
7.4.100.0120.00916.51
7.4.90.0120.00616.57
7.4.80.0120.00919.39
7.4.70.0060.01216.51
7.4.60.0100.00616.50
7.4.50.0090.00616.56
7.4.40.0080.01216.33
7.4.10.0090.00915.01
7.4.00.0090.01014.98
7.3.330.0030.00313.23
7.3.320.0000.00513.15
7.3.310.0030.00316.36
7.3.300.0070.00016.23
7.3.290.0060.00316.23
7.3.280.0160.01116.33
7.3.260.0100.00916.48
7.3.240.0090.00916.43
7.3.230.0070.01016.59
7.3.210.0150.00316.41
7.3.200.0000.01616.28
7.3.190.0130.01016.39
7.3.180.0140.00316.38
7.3.170.0050.01116.34
7.3.160.0060.01016.53
7.3.130.0020.01514.81
7.3.120.0070.01114.74
7.3.110.0050.01314.68
7.3.100.0100.00314.74
7.3.90.0100.00314.82
7.3.80.0050.00514.81
7.3.70.0000.01214.71
7.3.60.0070.00714.90
7.3.50.0030.00914.52
7.3.40.0070.01014.68
7.3.30.0040.00914.72
7.3.20.0200.00815.90
7.3.10.0180.01116.00
7.3.00.0160.00915.95
7.2.330.0120.00616.44
7.2.320.0120.01816.57
7.2.310.0160.00016.52
7.2.300.0090.01616.45
7.2.290.0180.00516.46
7.2.260.0030.01514.98
7.2.250.0040.01314.71
7.2.240.0030.01014.92
7.2.230.0110.00614.89
7.2.220.0020.00914.97
7.2.210.0050.00714.76
7.2.200.0000.01014.96
7.2.190.0110.00514.68
7.2.180.0030.00714.62
7.2.170.0080.00815.03
7.2.160.0060.00714.91
7.2.150.0250.00316.20
7.2.140.0190.00916.21
7.2.130.0200.00616.23
7.2.120.0240.00316.00
7.2.110.0150.01016.07
7.2.100.0240.00916.15
7.2.90.0210.00616.06
7.2.80.0210.00616.16
7.2.70.0220.00416.12
7.2.60.0190.00616.07
7.2.50.0200.00616.00
7.2.40.0190.00716.20
7.2.30.0250.00816.23
7.2.20.0150.00916.14
7.2.10.0280.00716.20
7.2.00.0230.00916.08
7.1.330.0090.00415.65
7.1.320.0070.00615.86
7.1.310.0050.00715.82
7.1.300.0070.00715.71
7.1.290.0060.00515.69
7.1.280.0070.00715.64
7.1.270.0210.00315.14
7.1.260.0470.00415.00
7.1.250.0180.00814.90
7.1.240.0110.00515.71
7.1.230.0030.00915.73
7.1.220.0090.00615.68
7.1.210.0040.00915.65
7.1.200.0020.01015.50
7.1.190.0080.00715.68
7.1.180.0050.00915.73
7.1.170.0050.00715.51
7.1.160.0060.00915.65
7.1.150.0030.00815.74
7.1.140.0060.00815.64
7.1.130.0100.00515.54
7.1.120.0030.00915.50
7.1.110.0050.00915.58
7.1.100.0010.00715.40
7.1.90.0070.00915.56
7.1.80.0060.00715.60
7.1.70.0100.00315.51
7.1.60.0030.00815.78
7.1.50.0030.01015.66
7.1.40.0050.00815.68
7.1.30.0090.00415.67
7.1.20.0060.00415.56
7.1.10.0030.00615.67
7.1.00.0060.00815.69

preferences:
11.58 ms | 406 KiB | 5 Q