3v4l.org

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

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.0050.00317.39
8.1.60.0000.00817.60
8.1.50.0090.00017.45
8.1.40.0000.00717.48
8.1.30.0080.00017.60
8.1.20.0070.00317.68
8.1.10.0040.00417.61
8.1.00.0030.00517.52
8.0.200.0060.00316.95
8.0.190.0050.00217.00
8.0.180.0050.00316.94
8.0.170.0050.00316.96
8.0.160.0040.00416.87
8.0.150.0040.00416.85
8.0.140.0050.00316.76
8.0.130.0030.00313.29
8.0.120.0030.00516.75
8.0.110.0040.00416.84
8.0.100.0040.00416.93
8.0.90.0000.00716.97
8.0.80.0120.00316.90
8.0.70.0030.00516.93
8.0.60.0000.00716.86
8.0.50.0070.00016.97
8.0.30.0120.00316.99
8.0.20.0140.00517.07
8.0.10.0040.00416.98
8.0.00.0110.01416.69
7.4.300.0070.00016.61
7.4.290.0030.00316.40
7.4.280.0020.00516.61
7.4.270.0030.00316.54
7.4.260.0030.00316.59
7.4.250.0070.00016.51
7.4.240.0040.00416.41
7.4.230.0040.00416.48
7.4.220.0000.00816.31
7.4.210.0080.00916.59
7.4.200.0030.00316.68
7.4.160.0080.00916.50
7.4.140.0130.00717.86
7.4.130.0140.00316.33
7.4.120.0160.00316.54
7.4.110.0100.00716.59
7.4.100.0070.01016.58
7.4.90.0070.01116.39
7.4.80.0130.01219.39
7.4.70.0130.01016.45
7.4.60.0000.01616.61
7.4.50.0070.00716.23
7.4.40.0120.00916.25
7.4.00.0070.01015.07
7.3.330.0050.00013.25
7.3.320.0050.00213.33
7.3.310.0030.00316.34
7.3.300.0070.00016.34
7.3.290.0100.01016.29
7.3.280.0120.01316.29
7.3.260.0090.00816.48
7.3.230.0130.00316.52
7.3.210.0100.00716.39
7.3.200.0160.00016.60
7.3.190.0040.01816.38
7.3.180.0060.01316.56
7.3.170.0070.01416.56
7.3.160.0060.01316.40
7.3.120.0040.01314.73
7.3.110.0050.01114.62
7.3.100.0030.00914.69
7.3.90.0060.00814.93
7.3.80.0060.00714.87
7.3.70.0020.01014.59
7.3.60.0050.00814.61
7.3.50.0050.00814.74
7.3.40.0060.00914.67
7.3.30.0100.00714.66
7.3.20.0190.00716.13
7.3.10.0200.00416.07
7.3.00.0150.00716.04
7.2.330.0030.01316.61
7.2.320.0150.00716.64
7.2.310.0100.00716.45
7.2.300.0090.01616.57
7.2.290.0080.01316.26
7.2.250.0050.01415.03
7.2.240.0050.01215.04
7.2.230.0090.00914.96
7.2.220.0020.01514.98
7.2.210.0070.00515.12
7.2.200.0070.00614.99
7.2.190.0020.01315.07
7.2.180.0050.00815.09
7.2.170.0060.00914.94
7.2.160.0100.00915.02
7.2.150.0320.01315.79
7.2.140.0270.00715.84
7.2.130.0270.00915.85
7.2.120.0340.01115.98
7.2.110.0300.01315.78
7.2.100.0310.01416.08
7.2.90.0290.01215.80
7.2.80.0330.00916.05
7.2.70.0200.01815.84
7.2.60.0320.01015.78
7.2.50.0320.00716.03
7.2.40.0310.00815.90
7.2.30.0280.00815.92
7.2.20.0280.00615.76
7.2.10.0480.01015.88
7.2.00.0260.00815.99
7.1.330.0060.00715.79
7.1.320.0050.01115.74
7.1.310.0030.01015.78
7.1.300.0050.00815.56
7.1.290.0090.00415.76
7.1.280.0020.01215.66
7.1.270.0200.01015.29
7.1.260.0160.00515.18
7.1.250.0330.01014.63

preferences:
11.56 ms | 406 KiB | 5 Q