3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); const LINES = 5; const INDEX = 10; $file_01 = new SplTempFileObject(); $file_02 = new SplFileObject('/tmp/test.txt', 'w+'); // write to files for ($i = 0; $i < LINES; $i++) { $file_01->fwrite("line {$i}" . PHP_EOL); $file_02->fwrite("line {$i}" . PHP_EOL); } // reset $file_01->rewind(); $file_02->rewind(); // seek $file_01->seek(INDEX); $file_02->seek(INDEX); // show results echo 'file_01: ' . $file_01->key(), PHP_EOL; echo 'file_02: ' . $file_02->key(), PHP_EOL;

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.5.10.0110.00518.65
8.5.00.0130.00818.43
8.4.150.0090.00416.85
8.4.140.0120.00917.59
8.4.130.0210.00618.33
8.4.120.0230.01019.16
8.4.110.0230.00918.40
8.4.100.0220.01118.40
8.4.90.0190.00919.09
8.4.80.0230.00918.24
8.4.70.0200.00718.30
8.4.60.0280.00918.22
8.4.50.0220.00818.22
8.4.40.0300.00718.47
8.4.30.0250.01018.91
8.4.20.0230.00718.53
8.4.10.0260.00619.81
8.3.280.0080.00718.34
8.3.270.0250.01116.82
8.3.260.0260.00616.94
8.3.250.0220.00817.24
8.3.240.0300.00816.93
8.3.230.0230.00516.96
8.3.220.0220.00918.06
8.3.210.0200.00716.94
8.3.200.0220.00416.94
8.3.190.0240.01017.19
8.3.180.0270.00818.13
8.3.170.0250.00917.00
8.3.160.0250.00917.13
8.3.150.0270.00917.13
8.3.140.0240.00618.06
8.3.130.0240.00416.83
8.3.120.0200.00718.01
8.3.110.0170.00819.09
8.3.100.0240.00316.79
8.3.90.0130.00822.00
8.3.80.0190.00816.87
8.3.70.0250.00916.91
8.3.60.0250.00616.99
8.3.50.0300.00717.85
8.3.40.0210.01018.09
8.3.30.0190.00718.52
8.3.20.0180.00621.00
8.3.10.0160.00621.16
8.3.00.0130.00521.97
8.2.290.0190.00618.73
8.2.280.0200.00818.84
8.2.270.0210.00716.81
8.2.260.0180.00617.03
8.2.250.0170.00817.88
8.2.240.0220.00717.30
8.2.230.0160.00819.91
8.2.220.0200.01020.65
8.2.210.0230.00522.00
8.2.200.0170.00816.93
8.2.190.0260.00817.76
8.2.180.0210.00921.58
8.2.170.0220.00518.48
8.2.160.0200.00820.49
8.2.150.0160.00621.80
8.2.140.0180.00621.28
8.2.130.0180.00521.85
8.2.120.0150.00819.50
8.2.110.0200.00519.98
8.2.100.0210.00517.87
8.2.90.0170.00618.50
8.2.80.0160.00817.90
8.2.70.0210.00948.56
8.2.60.0230.00748.59
8.2.50.0200.00848.57
8.2.40.0200.00948.55
8.2.30.0180.00948.53
8.2.20.0240.00448.59
8.2.10.0240.00348.59
8.2.00.0190.00948.62
8.1.330.0230.00617.56
8.1.320.0200.00816.74
8.1.310.0170.00616.73
8.1.300.0160.00717.93
8.1.290.0190.00724.04
8.1.280.0170.01221.58
8.1.270.0240.00818.76
8.1.260.0190.00421.99
8.1.250.0170.00922.73
8.1.240.0180.00819.13
8.1.230.0140.01017.67
8.1.220.0150.00817.65
8.1.210.0210.00618.20
8.1.200.0180.00748.47
8.1.190.0200.00548.43
8.1.180.0210.00748.31
8.1.170.0180.00848.43
8.1.160.0210.00648.42
8.1.150.0200.00748.47
8.1.140.0210.00748.51
8.1.130.0200.00748.42
8.1.120.0180.00748.55
8.1.110.0190.00648.54
8.1.100.0250.00448.54
8.1.90.0210.00648.50
8.1.80.0240.00548.35
8.1.70.0230.00348.51
8.1.60.0200.00848.44
8.1.50.0180.00948.54
8.1.40.0170.01248.53
8.1.30.0160.00748.63
8.1.20.0160.00748.58
8.1.10.0230.00548.68
8.1.00.0170.00748.52
8.0.300.0150.00718.00
8.0.290.0180.00748.28
8.0.280.0210.00548.28
8.0.270.0190.00648.28
8.0.260.0230.00848.28
8.0.250.0210.00448.28
8.0.240.0190.00648.28
8.0.230.0210.00448.28
8.0.220.0210.00548.28
8.0.210.0160.00948.28
8.0.200.0200.00648.28
8.0.190.0200.00548.28
8.0.180.0170.00748.28
8.0.170.0210.00548.28
8.0.160.0190.00648.28
8.0.150.0180.00748.28
8.0.140.0190.00748.28
8.0.130.0120.01348.28
8.0.120.0160.00948.28
8.0.110.0200.00548.28
8.0.100.0200.00548.28
8.0.90.0160.00948.28
8.0.80.0190.00548.28
8.0.70.0200.00448.28
8.0.60.0200.00648.28
8.0.50.0180.00648.28
8.0.30.0210.00448.28
8.0.20.0240.00248.28
8.0.10.0210.00548.28
7.4.330.0190.00448.28
7.4.320.0160.00948.28
7.4.300.0180.00748.28
7.4.290.0200.00548.28
7.4.280.0180.00748.28
7.4.270.0190.00648.28
7.4.260.0220.00248.28
7.4.250.0190.00548.28
7.4.240.0180.00648.28
7.4.230.0150.00848.28
7.4.220.0230.00348.28
7.4.210.0180.00748.28
7.4.200.0210.00648.28
7.4.190.0200.00848.28
7.4.180.0180.00748.28
7.4.160.0190.00548.28
7.4.150.0200.00548.28
7.4.140.0180.00648.28
7.4.130.0210.00448.28
7.4.120.0200.00448.28
7.4.110.0200.00648.28
7.4.100.0220.00448.28
7.4.90.0170.00748.28
7.4.80.0180.00548.28
7.4.70.0170.00748.28
7.4.60.0200.00448.28
7.4.50.0170.00648.28
7.4.40.0210.00348.28
7.4.30.0180.00648.28
7.4.20.0170.00748.28
7.4.10.0200.00448.28
7.4.00.0220.00348.28

preferences:
79.32 ms | 403 KiB | 5 Q