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(); // read first line $file->fgets(); // where am I? 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.0040.00622.07
8.4.110.0110.00918.95
8.4.100.0090.01117.47
8.4.90.0140.00717.65
8.4.80.0110.01017.85
8.4.70.0140.00719.72
8.4.60.0120.00818.89
8.4.50.0100.00418.69
8.4.40.0110.00719.36
8.4.30.0210.00020.41
8.4.20.0080.01219.66
8.4.10.0060.00322.18
8.3.250.0100.00918.80
8.3.240.0040.00416.73
8.3.230.0050.00416.57
8.3.220.0130.00616.39
8.3.210.0080.00616.50
8.3.200.0040.00516.71
8.3.190.0120.00717.22
8.3.180.0030.00517.18
8.3.170.0080.01119.05
8.3.160.0090.00917.14
8.3.150.0110.00717.11
8.3.140.0090.00916.67
8.3.130.0080.00018.40
8.3.120.0000.01020.75
8.3.110.0140.00720.94
8.3.100.0100.00016.43
8.3.90.0100.00726.77
8.3.80.0060.00316.50
8.3.70.0040.01118.43
8.3.60.0110.00418.35
8.3.50.0070.00720.03
8.3.40.0110.00418.84
8.3.30.0110.00319.29
8.3.20.0040.00424.18
8.3.10.0000.00724.66
8.3.00.0000.00826.16
8.2.290.0120.00620.26
8.2.280.0140.00518.19
8.2.270.0130.01017.36
8.2.260.0090.00916.63
8.2.250.0140.00416.66
8.2.240.0060.00918.99
8.2.230.0050.00322.58
8.2.220.0080.00024.06
8.2.210.0040.00426.77
8.2.200.0030.00618.54
8.2.190.0040.01116.63
8.2.180.0060.01225.92
8.2.170.0070.01118.66
8.2.160.0040.01122.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00421.04
8.2.110.0040.00422.23
8.2.100.0090.00317.72
8.2.90.0030.00520.64
8.2.80.0040.00418.82
8.2.70.0060.00317.63
8.2.60.0060.00318.04
8.2.50.0040.00418.07
8.2.40.0030.00619.95
8.2.30.0000.00818.11
8.2.20.0000.00720.38
8.2.10.0000.00717.97
8.2.00.0040.00419.19
8.1.330.0110.00818.59
8.1.320.0100.01016.04
8.1.310.0070.01118.30
8.1.300.0060.00316.11
8.1.290.0030.00630.84
8.1.280.0120.00325.92
8.1.270.0000.00724.02
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00322.12
8.1.230.0070.00417.64
8.1.220.0000.00917.76
8.1.210.0030.00518.77
8.1.200.0000.00817.35
8.1.190.0000.00917.23
8.1.180.0000.00818.10
8.1.170.0080.00018.36
8.1.160.0050.00318.89
8.1.150.0040.00818.63
8.1.140.0000.00717.36
8.1.130.0050.00318.79
8.1.120.0050.00317.39
8.1.110.0080.00017.35
8.1.100.0040.00417.48
8.1.90.0070.00017.34
8.1.80.0060.00317.32
8.1.70.0040.00417.47
8.1.60.0110.01117.53
8.1.50.0180.00017.51
8.1.40.0100.00417.47
8.1.30.0090.00517.64
8.1.20.0160.00017.67
8.1.10.0110.00317.58
8.1.00.0120.00217.53
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0040.00418.39
8.0.270.0050.00316.82
8.0.260.0040.00418.48
8.0.250.0030.00616.98
8.0.240.0040.00416.89
8.0.230.0070.00016.95
8.0.220.0000.00716.85
8.0.210.0000.00716.79
8.0.200.0030.00316.94
8.0.190.0190.00516.91
8.0.180.0140.01016.88
8.0.170.0140.00816.77
8.0.160.0150.00616.80
8.0.150.0130.00816.80
8.0.140.0170.00316.91
8.0.130.0190.00316.80
8.0.120.0100.01016.78
8.0.110.0140.00716.92
8.0.100.0150.00516.78
8.0.90.0180.00316.80
8.0.80.0180.00416.90
8.0.70.0210.00416.87
8.0.60.0140.00516.83
8.0.50.0190.00316.87
8.0.30.0140.00516.82
8.0.20.0160.00316.87
8.0.10.0160.00316.82
7.4.330.0030.00315.55
7.4.320.0070.00016.47
7.4.300.0000.00616.43
7.4.290.0090.01216.43
7.4.280.0120.00916.36
7.4.270.0160.00816.44
7.4.260.0130.01016.42
7.4.250.0200.00316.38
7.4.240.0170.00716.45
7.4.230.0180.00716.34
7.4.220.0120.00916.36
7.4.210.0210.00016.57
7.4.200.0150.00416.41
7.4.190.0190.00016.57
7.4.180.0140.00516.52
7.4.160.0200.00016.60
7.4.150.0190.00016.32
7.4.140.0200.00016.40
7.4.130.0160.00416.32
7.4.120.0190.00016.45
7.4.110.0030.00816.29
7.4.100.0130.00216.51
7.4.90.0040.01116.41
7.4.80.0120.00216.27
7.4.70.0060.00616.47
7.4.60.0000.00816.49
7.4.50.0000.00816.20
7.4.40.0060.00316.33
7.4.30.0030.00616.34
7.4.20.0070.00216.39
7.4.10.0080.00816.40
7.4.00.0030.01116.48

preferences:
25.98 ms | 403 KiB | 5 Q