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.4.20.0150.00618.75
8.4.10.0040.00419.60
8.3.150.0090.00917.37
8.3.140.0160.00316.79
8.3.130.0080.00016.66
8.3.120.0040.00420.67
8.3.110.0080.00016.57
8.3.100.0030.00616.63
8.3.90.0080.00020.32
8.3.80.0070.00318.43
8.3.70.0070.01116.58
8.3.60.0070.01118.55
8.3.50.0110.00317.52
8.3.40.0090.00618.84
8.3.30.0070.00718.79
8.3.20.0060.00320.64
8.3.10.0060.00323.61
8.3.00.0110.00020.39
8.2.260.0080.00017.00
8.2.250.0030.00618.75
8.2.240.0060.00317.42
8.2.230.0000.01420.94
8.2.220.0070.00437.54
8.2.210.0040.00726.77
8.2.200.0030.00716.50
8.2.190.0000.01516.58
8.2.180.0040.01125.92
8.2.170.0120.00618.96
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0070.00318.91
8.2.110.0030.00719.10
8.2.100.0080.00417.97
8.2.90.0000.00817.75
8.2.80.0080.00018.77
8.2.70.0000.00817.50
8.2.60.0040.00417.63
8.2.50.0000.00817.55
8.2.40.0030.00520.48
8.2.30.0040.00419.31
8.2.20.0000.00818.12
8.2.10.0030.00619.21
8.2.00.0070.00017.95
8.1.310.0150.00416.45
8.1.300.0100.01016.04
8.1.290.0000.00918.88
8.1.280.0090.00925.92
8.1.270.0000.00820.73
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00621.06
8.1.230.0110.00022.69
8.1.220.0090.00018.47
8.1.210.0080.00018.77
8.1.200.0040.00417.52
8.1.190.0040.00417.10
8.1.180.0080.00018.10
8.1.170.0000.00818.50
8.1.160.0030.00518.75
8.1.150.0080.00018.77
8.1.140.0000.00720.32
8.1.130.0060.00320.36
8.1.120.0050.00217.37
8.1.110.0000.00717.40
8.1.100.0040.00417.38
8.1.90.0000.00717.45
8.1.80.0030.00717.42
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.300.0000.00819.98
8.0.290.0000.00816.75
8.0.280.0030.00318.46
8.0.270.0000.00717.18
8.0.260.0030.00320.21
8.0.250.0000.00717.04
8.0.240.0070.00016.98
8.0.230.0030.00317.00
8.0.220.0000.00716.83
8.0.210.0070.00016.98
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.330.0050.00015.55
7.4.320.0030.00316.43
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:
36.15 ms | 403 KiB | 5 Q