3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = new SplFileObject('php://memory', 'r+'); assert('$f instanceof Iterator'); $f->fwrite("line 1"); $f->rewind(); assert($f->valid() === true); assert($f->eof() === false); assert($f->current() === "line 1"); //assert($f->valid() === true); // fails assert($f->eof() === true);

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.60.0120.00318.15
8.3.50.0230.00621.92
8.3.40.0070.00718.84
8.3.30.0040.01118.92
8.3.20.0070.00020.29
8.3.10.0050.00321.95
8.3.00.0050.00322.43
8.2.180.0100.00616.32
8.2.170.0110.00422.96
8.2.160.0070.00720.52
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0040.00426.16
8.2.120.0060.00317.68
8.2.110.0060.00322.13
8.2.100.0040.01117.59
8.2.90.0040.00419.28
8.2.80.0000.00719.27
8.2.70.0080.00017.61
8.2.60.0030.00617.93
8.2.50.0000.00818.07
8.2.40.0040.00417.80
8.2.30.0000.00717.91
8.2.20.0000.00717.63
8.2.10.0040.00417.76
8.2.00.0040.00417.60
8.1.280.0070.00725.92
8.1.270.0100.00020.15
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00423.72
8.1.230.0070.00318.94
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0000.00817.11
8.1.190.0000.00717.54
8.1.180.0070.00020.32
8.1.170.0050.00318.32
8.1.160.0040.00422.09
8.1.150.0000.00718.64
8.1.140.0050.00317.39
8.1.130.0030.00317.84
8.1.120.0000.00817.41
8.1.110.0040.00417.44
8.1.100.0000.00817.34
8.1.90.0050.00217.30
8.1.80.0040.00417.40
8.1.70.0000.00717.30
8.1.60.0040.00417.61
8.1.50.0040.00417.40
8.1.40.0040.00417.41
8.1.30.0000.00817.64
8.1.20.0080.00017.60
8.1.10.0050.00217.61
8.1.00.0000.00817.52
8.0.300.0070.00018.77
8.0.290.0020.00517.05
8.0.280.0000.00718.38
8.0.270.0040.00417.20
8.0.260.0040.00416.73
8.0.250.0000.00716.94
8.0.240.0040.00416.99
8.0.230.0040.00416.98
8.0.220.0050.00216.84
8.0.210.0030.00316.91
8.0.200.0030.00316.94
8.0.190.0050.00216.93
8.0.180.0000.00716.80
8.0.170.0000.00816.80
8.0.160.0040.00416.73
8.0.150.0040.00316.86
8.0.140.0050.00316.87
8.0.130.0070.00013.33
8.0.120.0000.00816.81
8.0.110.0090.00016.96
8.0.100.0000.00716.78
8.0.90.0000.00716.89
8.0.80.0130.00716.84
8.0.70.0000.00716.77
8.0.60.0080.00016.68
8.0.50.0000.00716.95
8.0.30.0080.01217.04
8.0.20.0100.00917.40
8.0.10.0080.00017.02
8.0.00.0070.01316.76
7.4.330.0050.00015.00
7.4.320.0000.00616.54
7.4.300.0070.00016.64
7.4.290.0080.00016.52
7.4.280.0030.00316.65
7.4.270.0000.00616.52
7.4.260.0030.00316.54
7.4.250.0000.00716.40
7.4.240.0030.00516.53
7.4.230.0000.00716.59
7.4.220.0060.01216.48
7.4.210.0070.00716.63
7.4.200.0050.00316.70
7.4.190.0030.00316.46
7.4.160.0100.00716.50
7.4.150.0070.01117.40
7.4.140.0080.01017.86
7.4.130.0110.00916.47
7.4.120.0070.01016.60
7.4.110.0130.00416.43
7.4.100.0180.00016.58
7.4.90.0120.00916.58
7.4.80.0090.01519.39
7.4.70.0050.01116.43
7.4.60.0000.01816.50
7.4.50.0030.00616.36
7.4.40.0080.01022.77
7.4.30.0060.00916.35
7.4.00.0040.00814.74
7.3.330.0000.00613.31
7.3.320.0000.00613.34
7.3.310.0030.00316.48
7.3.300.0000.00716.30
7.3.290.0070.00716.43
7.3.280.0110.00716.38
7.3.270.0100.01017.40
7.3.260.0060.01216.73
7.3.250.0100.01016.32
7.3.240.0120.01216.33
7.3.230.0100.00716.39
7.3.210.0060.01216.55
7.3.200.0040.01219.39
7.3.190.0060.01216.41
7.3.180.0130.00416.53
7.3.170.0140.00716.51
7.3.160.0120.00416.48
7.3.120.0030.01014.87
7.3.10.0070.00716.39
7.3.00.0060.00916.35
7.2.330.0030.01516.41
7.2.320.0040.01416.72
7.2.310.0110.00816.39
7.2.300.0100.00716.75
7.2.290.0000.01516.64
7.2.130.0030.01016.32
7.2.120.0080.00416.34
7.2.110.0070.00216.40
7.2.100.0040.00816.26
7.2.90.0120.00616.59
7.2.80.0030.01016.69
7.2.70.0070.00716.67
7.2.60.0120.00216.68
7.2.50.0000.01116.64
7.2.40.0090.00016.46
7.2.30.0030.00616.59
7.2.20.0090.00316.25
7.2.10.0060.00316.57
7.2.00.0080.00818.14
7.1.250.0080.00415.63
7.1.200.0030.00715.74
7.1.100.0120.00318.13
7.1.70.0060.00617.26
7.1.60.0100.01419.82
7.1.50.0070.01416.85
7.1.00.0070.05322.57
7.0.200.0000.01116.85
7.0.140.0030.07022.16
7.0.60.0100.06720.04
7.0.50.0170.07717.89
7.0.40.0030.04720.21
7.0.30.0430.08020.18
7.0.20.0200.06020.13
7.0.10.0000.04320.13
7.0.00.0030.06020.30
5.6.280.0030.07320.86
5.6.210.0100.08020.71
5.6.200.0130.07018.16
5.6.190.0030.04720.27
5.6.180.0270.07720.49
5.6.170.0270.05320.71
5.6.160.0070.04720.47
5.6.150.0130.03018.21
5.6.140.0100.07318.09
5.6.130.0130.07318.11
5.6.120.0100.06720.89
5.6.110.0100.08020.98
5.6.100.0030.04021.00
5.6.90.0030.04020.97
5.6.80.0100.07720.40
5.6.70.0600.07020.37
5.5.350.0070.07320.41
5.5.340.0000.04718.02
5.5.330.0070.07320.12
5.5.320.0270.03720.18
5.5.310.0300.06720.29
5.5.300.0030.05018.02
5.5.290.0070.04317.89
5.5.280.0130.07020.72
5.5.270.0070.08320.75
5.5.260.0130.05720.86
5.5.250.0230.06720.58
5.5.240.0070.06720.23
5.4.450.0670.06719.55
5.4.440.0800.07019.46
5.4.430.0430.07319.48
5.4.420.0700.06019.41
5.4.410.0600.06019.50
5.4.400.0370.05718.66
5.4.390.0330.06318.68
5.4.380.0230.06718.54
5.4.370.0170.05018.61
5.4.360.0300.03318.56
5.4.350.0080.03411.98
5.4.340.0090.03511.98
5.4.320.0030.03912.46
5.4.310.0070.03912.46
5.4.300.0080.04212.46
5.4.290.0050.04212.46
5.4.280.0100.03712.36
5.4.270.0040.04112.36
5.4.260.0070.04112.36
5.4.250.0130.06718.91
5.4.240.0100.05318.67
5.4.230.0100.05318.64
5.4.220.0030.07718.96
5.4.210.0000.06018.82
5.4.200.0130.05718.95
5.4.190.0000.06018.94
5.4.180.0130.06318.79
5.4.170.0100.05018.83
5.4.160.0170.05318.82
5.4.150.0000.06718.82
5.4.140.0070.05316.48
5.4.130.0030.05316.25
5.4.120.0100.05016.23
5.4.110.0100.06316.29
5.4.100.0030.08016.21
5.4.90.0130.04016.39
5.4.80.0070.04716.27
5.4.70.0100.05016.13
5.4.60.0030.05716.27
5.4.50.0230.04016.13
5.4.40.0130.04316.36
5.4.30.0100.05016.34
5.4.20.0100.04716.32
5.4.10.0030.07316.28
5.4.00.0000.05315.92
5.3.290.0060.03912.80
5.3.280.0100.06314.52
5.3.270.0100.07714.50
5.3.260.0170.05714.38
5.3.250.0170.06314.46
5.3.240.0030.05714.48
5.3.230.0070.06714.30
5.3.220.0030.06714.57
5.3.210.0100.06014.43
5.3.200.0100.05014.41
5.3.190.0100.06314.34
5.3.180.0070.05314.61
5.3.170.0070.05014.44
5.3.160.0130.04314.46
5.3.150.0070.05314.62
5.3.140.0030.05714.58
5.3.130.0070.05714.70
5.3.120.0070.05314.50
5.3.110.0070.05014.41
5.3.100.0130.06313.91
5.3.90.0100.05014.06
5.3.80.0100.05014.04
5.3.70.0100.04714.07
5.3.60.0070.07013.70
5.3.50.0100.07013.83
5.3.40.0130.04713.66
5.3.30.0100.04713.78
5.3.20.0070.05313.40
5.3.10.0170.04013.60
5.3.00.0070.05713.65
5.2.170.0000.06710.99
5.2.160.0170.03310.99
5.2.150.0000.06711.26
5.2.140.0000.06711.16
5.2.130.0000.06011.12
5.2.120.0100.05011.00
5.2.110.0070.04311.02
5.2.100.0000.04311.26
5.2.90.0070.03710.86
5.2.80.0070.04011.02
5.2.70.0100.03711.12
5.2.60.0030.04311.16
5.2.50.0130.03311.05
5.2.40.0030.04011.02
5.2.30.0030.05010.98
5.2.20.0130.03310.73
5.2.10.0030.04310.84
5.2.00.0070.04010.70
5.1.60.0030.03310.11
5.1.50.0070.0339.99
5.1.40.0100.04310.07
5.1.30.0100.03310.55
5.1.20.0130.04010.18
5.1.10.0000.0409.98
5.1.00.0000.04010.16
5.0.50.0070.0238.43
5.0.40.0070.0238.13
5.0.30.0030.0608.30
5.0.20.0030.0278.19
5.0.10.0070.0278.21
5.0.00.0100.0408.11
4.4.90.0070.0175.93
4.4.80.0070.0175.90
4.4.70.0030.0305.76
4.4.60.0000.0235.75
4.4.50.0030.0205.78
4.4.40.0030.0335.75
4.4.30.0030.0205.69
4.4.20.0030.0205.87
4.4.10.0030.0235.84
4.4.00.0070.0305.86
4.3.110.0070.0235.70
4.3.100.0030.0305.69
4.3.90.0070.0175.70
4.3.80.0030.0335.70
4.3.70.0000.0275.68
4.3.60.0030.0205.68
4.3.50.0030.0205.68
4.3.40.0030.0435.71
4.3.30.0000.0335.68
4.3.20.0070.0235.68
4.3.10.0030.0205.68
4.3.00.0070.0236.29

preferences:
39.99 ms | 401 KiB | 5 Q