3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'string'; $offset = new stdClass(); $v1 = isset($str[$offset]) ? 'true' : 'false'; var_dump($v1); $v2 = $str[$offset] ?? 'false';

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.3.130.0040.00418.61
8.3.120.0050.00518.81
8.3.110.0000.00820.94
8.3.100.0030.00624.06
8.3.90.0080.00026.77
8.3.80.0000.00918.56
8.3.70.0150.00616.88
8.3.60.0100.01018.36
8.3.50.0140.00718.57
8.3.40.0040.01120.13
8.3.30.0070.00721.90
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0070.01328.09
8.2.250.0070.01116.83
8.2.240.0080.00017.05
8.2.230.0090.00022.58
8.2.220.0050.00537.54
8.2.210.0070.01026.77
8.2.200.0030.00616.50
8.2.190.0060.01016.75
8.2.180.0070.00716.50
8.2.170.0070.01119.03
8.2.160.0070.01022.96
8.2.150.0040.00425.66
8.2.140.0030.00624.66
8.2.130.0080.01228.09
8.2.120.0110.00728.09
8.2.110.0090.00928.09
8.2.100.0100.01028.09
8.2.90.0110.00828.09
8.2.80.0150.00628.09
8.2.70.0060.01328.09
8.2.60.0040.01128.09
8.2.50.0110.00428.09
8.2.40.0090.00628.09
8.2.30.0140.00728.09
8.2.20.0140.00728.09
8.2.10.0120.00328.09
8.2.00.0140.00728.09
8.1.300.0060.00320.24
8.1.290.0050.00530.84
8.1.280.0090.00625.92
8.1.270.0090.00020.35
8.1.260.0150.00428.09
8.1.250.0120.00328.09
8.1.240.0140.00728.09
8.1.230.0040.01128.09
8.1.220.0140.00728.09
8.1.210.0130.00728.09
8.1.200.0120.00328.09
8.1.190.0110.00428.09
8.1.180.0040.00428.09
8.1.170.0040.00428.09
8.1.160.0030.00628.09
8.1.150.0040.01528.09
8.1.140.0070.01428.09
8.1.130.0070.01428.09
8.1.120.0100.00728.09
8.1.110.0070.01028.09
8.1.100.0080.00028.09
8.1.90.0050.00328.09
8.1.80.0000.00928.09
8.1.70.0050.00528.09
8.1.60.0060.00328.09
8.1.50.0030.00528.09
8.1.40.0030.00628.09
8.1.30.0050.00328.09
8.1.20.0000.00828.09
8.1.10.0080.00028.09
8.1.00.0080.00028.09

preferences:
24.67 ms | 403 KiB | 5 Q