3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyObjectStorage extends SplObjectStorage { public function contains(object $o): bool { if ($o instanceof stdClass) { return true; } else { return false; } } } $std = new stdClass(); $storage = new MyObjectStorage(); var_dump($storage->contains($std)); var_dump(isset($storage[$std]));

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.120.0020.00722.55
8.4.110.0080.01018.64
8.4.100.0110.01017.75
8.4.90.0110.00718.84
8.4.80.0150.00519.45
8.4.70.0070.00717.75
8.4.60.0120.00818.86
8.4.50.0070.01220.52
8.4.40.0130.00717.43
8.4.30.0040.00418.67
8.4.20.0040.00419.46
8.4.10.0070.01119.29
8.3.250.0100.01018.86
8.3.240.0120.00916.34
8.3.230.0090.00916.42
8.3.220.0110.00617.19
8.3.210.0070.00116.39
8.3.200.0040.00516.45
8.3.190.0110.00717.22
8.3.180.0080.00716.63
8.3.170.0090.00916.79
8.3.160.0000.01916.66
8.3.150.0180.00317.12
8.3.140.0080.00017.22
8.3.130.0100.00018.35
8.3.120.0040.00419.09
8.3.110.0060.00316.53
8.3.100.0030.00616.50
8.3.90.0380.00926.77
8.3.80.0450.00726.77
8.3.70.0370.01226.77
8.3.60.0320.01126.77
8.3.50.0350.00926.77
8.3.40.0240.01126.77
8.3.30.0350.00926.77
8.3.20.0360.00926.77
8.3.10.0280.00726.77
8.3.00.0340.01226.77
8.2.290.0130.00820.33
8.2.280.0130.00920.30
8.2.270.0030.00517.38
8.2.260.0120.00318.34
8.2.250.0100.01018.29
8.2.240.0060.00317.17
8.2.230.0050.00320.94
8.2.220.0060.00324.06
8.2.210.0200.00326.77
8.2.200.0280.01126.77
8.2.190.0270.01026.77
8.2.180.0330.00726.77
8.2.170.0350.01026.77
8.2.160.0390.01026.77
8.2.150.0360.00926.77
8.2.140.0300.00726.77
8.2.130.0260.00826.77
8.2.120.0260.00426.77
8.2.110.0230.00726.77
8.2.100.0220.01326.77
8.2.90.0280.00626.77
8.2.80.0260.00626.77
8.2.70.0310.00626.77
8.2.60.0110.00726.77
8.2.50.0240.00426.77
8.2.40.0130.00726.77
8.2.30.0150.00626.77
8.2.20.0240.00526.77
8.2.10.0330.00626.77
8.2.00.0260.00526.77
8.1.330.0020.00822.00
8.1.320.0090.01016.36
8.1.310.0040.00417.01
8.1.300.0090.00019.51
8.1.290.0210.00926.77
8.1.280.0220.00826.77
8.1.270.0330.01126.77
8.1.260.0300.00926.77
8.1.250.0280.00626.77
8.1.240.0220.01026.77
8.1.230.0280.00826.77
8.1.220.0310.00726.77
8.1.210.0280.01126.77
8.1.200.0310.00726.77
8.1.190.0330.00626.77
8.1.180.0330.00826.77
8.1.170.0340.00326.77
8.1.160.0310.00526.77
8.1.150.0330.01126.77
8.1.140.0290.01326.77
8.1.130.0280.00526.77
8.1.120.0290.01126.77
8.1.110.0330.01226.77
8.1.100.0360.00826.77
8.1.90.0340.00226.77
8.1.80.0270.00426.77
8.1.70.0170.00926.77
8.1.60.0210.00926.77
8.1.50.0220.01326.77
8.1.40.0310.00726.77
8.1.30.0350.00526.77
8.1.20.0310.01426.77
8.1.10.0280.00826.77
8.1.00.0300.01126.77

preferences:
35.58 ms | 403 KiB | 5 Q