3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); $file = new SplTempFileObject(); // write to file for ($i = 0; $i < 5; $i++) { $file->fwrite("line {$i}" . PHP_EOL); } $file->rewind(); $file->next(); echo $file->key(), ': ', $file->current();

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.0120.00720.39
8.4.110.0130.00622.80
8.4.100.0090.01118.58
8.4.90.0080.00218.94
8.4.80.0060.00318.40
8.4.70.0070.00717.91
8.4.60.0120.00918.99
8.4.50.0150.00619.62
8.4.40.0170.00319.32
8.4.30.0090.00620.64
8.4.20.0070.00319.79
8.4.10.0100.01021.93
8.3.250.0100.00818.93
8.3.240.0090.01017.09
8.3.230.0070.00116.32
8.3.220.0090.00819.06
8.3.210.0140.00616.73
8.3.200.0060.00216.28
8.3.190.0110.00717.00
8.3.180.0110.00816.47
8.3.170.0090.00918.85
8.3.160.0150.00418.37
8.3.150.0130.00320.57
8.3.140.0080.00817.20
8.3.130.0040.00418.25
8.3.120.0110.00718.93
8.3.110.0090.00020.94
8.3.100.0040.00416.48
8.3.90.0030.00526.77
8.3.80.0030.00616.50
8.3.70.0080.00816.58
8.3.60.0110.00416.63
8.3.50.0040.01120.21
8.3.40.0110.00418.73
8.3.30.0100.00719.22
8.3.20.0080.00024.18
8.3.10.0110.00424.66
8.3.00.0040.00426.16
8.2.290.0120.00620.55
8.2.280.0040.00418.59
8.2.270.0120.00617.10
8.2.260.0000.00820.84
8.2.250.0040.00416.67
8.2.240.0040.00418.66
8.2.230.0000.00822.58
8.2.220.0040.00424.06
8.2.210.0030.00526.77
8.2.200.0060.00316.38
8.2.190.0110.01118.16
8.2.180.0120.00625.92
8.2.170.0110.00419.01
8.2.160.0110.00322.96
8.2.150.0080.00025.66
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0000.00819.36
8.2.110.0000.00920.53
8.2.100.0070.00419.51
8.2.90.0080.00017.75
8.2.80.0080.00818.30
8.2.70.0080.00017.63
8.2.60.0040.00417.63
8.2.50.0000.00817.55
8.2.40.0060.00318.22
8.2.30.0040.00418.13
8.2.20.0040.00420.32
8.2.10.0040.00417.94
8.2.00.0050.00219.16
8.1.330.0100.00921.95
8.1.320.0100.01015.94
8.1.310.0040.01418.29
8.1.300.0090.00018.57
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0030.00626.35
8.1.250.0070.00028.09
8.1.240.0100.00023.82
8.1.230.0040.00721.05
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0080.00017.13
8.1.190.0040.00417.11
8.1.180.0070.00318.10
8.1.170.0030.00617.62
8.1.160.0080.00018.80
8.1.150.0100.00018.67
8.1.140.0020.00517.36
8.1.130.0030.00318.89
8.1.120.0070.00017.33
8.1.110.0000.00717.40
8.1.100.0000.00717.48
8.1.90.0070.00017.41
8.1.80.0070.00317.47
8.1.70.0070.00017.46
8.1.60.0020.00817.46
8.1.50.0090.01017.35
8.1.40.0200.00317.52
8.1.30.0050.01017.61
8.1.20.0130.00617.53
8.1.10.0190.00017.40
8.1.00.0120.00817.32
8.0.300.0000.00818.77
8.0.290.0040.00416.63
8.0.280.0000.00718.50
8.0.270.0030.00316.76
8.0.260.0000.00618.43
8.0.250.0040.00416.92
8.0.240.0040.00416.84
8.0.230.0070.00016.99
8.0.220.0030.00316.78
8.0.210.0050.00316.89
8.0.200.0040.00416.95
8.0.190.0090.00416.95
8.0.180.0110.00816.91
8.0.170.0090.01016.75
8.0.160.0150.00616.88
8.0.150.0140.00716.77
8.0.140.0210.00016.71
8.0.130.0150.00616.83
8.0.120.0140.00816.86
8.0.110.0220.00016.88
8.0.100.0180.00416.80
8.0.90.0170.00316.73
8.0.80.0180.00416.71
8.0.70.0180.00416.66
8.0.60.0140.00516.73
8.0.50.0150.00616.75
8.0.30.0190.00416.82
8.0.20.0120.00816.88
8.0.10.0180.00416.84
7.4.330.0000.00515.55
7.4.320.0060.00016.44
7.4.300.0060.00016.55
7.4.290.0190.00516.53
7.4.280.0180.00716.54
7.4.270.0190.00516.39
7.4.260.0200.00416.39
7.4.250.0200.00316.37
7.4.240.0110.00316.55
7.4.230.0110.00516.32
7.4.220.0180.00316.50
7.4.210.0190.00016.52
7.4.200.0200.00016.52
7.4.190.0230.00016.58
7.4.180.0130.00616.58
7.4.160.0170.00516.42
7.4.150.0140.00716.48
7.4.140.0180.00316.29
7.4.130.0140.00716.44
7.4.120.0120.00916.36
7.4.110.0090.00516.36
7.4.100.0140.00616.32
7.4.90.0170.00316.23
7.4.80.0150.00416.42
7.4.70.0060.01716.25
7.4.60.0170.00616.44
7.4.50.0200.00016.22
7.4.40.0080.00516.34
7.4.30.0110.00316.37
7.4.20.0030.01216.23
7.4.10.0110.00516.45
7.4.00.0070.00716.34

preferences:
27.81 ms | 403 KiB | 5 Q