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.0150.00018.30
8.3.50.0110.00416.49
8.3.40.0070.00718.71
8.3.30.0070.00718.96
8.3.20.0040.00420.34
8.3.10.0080.00022.13
8.3.00.0090.00022.24
8.2.180.0070.00716.63
8.2.170.0060.00822.96
8.2.160.0070.00720.38
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.01026.16
8.2.120.0040.00419.64
8.2.110.0030.00621.96
8.2.100.0050.00519.33
8.2.90.0040.00419.27
8.2.80.0000.00919.18
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0090.00018.07
8.2.40.0030.00618.22
8.2.30.0030.00518.05
8.2.20.0040.00417.57
8.2.10.0050.00217.59
8.2.00.0040.00417.68
8.1.270.0000.00820.26
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0060.00323.84
8.1.230.0110.00018.97
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0000.00917.28
8.1.180.0040.00420.13
8.1.170.0040.00418.59
8.1.160.0000.00722.19
8.1.150.0040.00418.63
8.1.140.0020.00517.43
8.1.130.0040.00417.82
8.1.120.0070.00017.32
8.1.110.0080.00017.31
8.1.100.0040.00417.31
8.1.90.0040.00417.39
8.1.80.0070.00017.31
8.1.70.0050.00217.39
8.1.60.0040.00417.49
8.1.50.0030.00517.50
8.1.40.0030.00517.40
8.1.30.0000.00817.59
8.1.20.0040.00417.52
8.1.10.0000.00917.61
8.1.00.0040.00417.52
8.0.300.0000.00818.77
8.0.290.0000.00717.05
8.0.280.0030.00318.29
8.0.270.0000.00717.08
8.0.260.0000.00616.77
8.0.250.0070.00016.95
8.0.240.0000.00716.86
8.0.230.0000.00716.93
8.0.220.0000.00716.91
8.0.210.0030.00316.76
8.0.200.0030.00316.99
8.0.190.0040.00416.98
8.0.180.0080.00016.81
8.0.170.0000.00816.93
8.0.160.0040.00416.86
8.0.150.0030.00316.70
8.0.140.0030.00516.82
8.0.130.0000.00613.27
8.0.120.0040.00416.74
8.0.110.0040.00416.84
8.0.100.0030.00516.75
8.0.90.0070.00016.75
8.0.80.0130.00316.78
8.0.70.0000.00816.95
8.0.60.0030.00516.77
8.0.50.0040.00416.71
8.0.30.0090.00916.82
8.0.20.0100.00917.40
8.0.10.0000.00717.07
8.0.00.0120.00516.61
7.4.330.0000.00515.00
7.4.320.0030.00316.62
7.4.300.0030.00316.64
7.4.290.0000.00716.46
7.4.280.0030.00316.51
7.4.270.0000.00716.45
7.4.260.0060.00316.50
7.4.250.0070.00016.52
7.4.240.0030.00516.58
7.4.230.0030.00316.68
7.4.220.0200.00016.53
7.4.210.0070.00916.68
7.4.200.0050.00316.40
7.4.190.0030.00316.50
7.4.160.0100.00616.45
7.4.150.0070.01017.40
7.4.140.0070.01117.86
7.4.130.0080.01116.66
7.4.120.0090.01116.56
7.4.110.0150.00616.43
7.4.100.0150.00716.30
7.4.90.0180.00416.50
7.4.80.0130.00919.39
7.4.70.0100.00716.29
7.4.60.0170.00016.56
7.4.50.0040.00416.54
7.4.40.0000.01622.77
7.4.30.0040.01116.59
7.4.00.0060.00615.09
7.3.330.0050.00013.30
7.3.320.0030.00213.27
7.3.310.0070.00016.26
7.3.300.0000.00716.45
7.3.290.0040.01116.38
7.3.280.0080.00716.41
7.3.270.0090.00917.40
7.3.260.0140.00516.36
7.3.250.0070.01416.34
7.3.240.0060.01216.43
7.3.230.0080.01016.55
7.3.210.0050.01416.30
7.3.200.0130.00619.39
7.3.190.0090.00916.40
7.3.180.0040.01716.45
7.3.170.0110.00816.56
7.3.160.0060.01016.32
7.3.120.0110.00414.96
7.2.330.0170.00016.70
7.2.320.0100.01016.53
7.2.310.0070.01816.77
7.2.300.0160.00016.72
7.2.290.0100.01316.67
7.2.60.0110.00316.74
7.1.200.0110.00015.85
7.1.70.0050.00316.97
7.1.60.0030.01017.03
7.1.50.0090.01216.84
7.1.00.0000.06722.31
7.0.200.0070.01016.77
7.0.140.0030.07722.09
7.0.60.0230.07720.11
7.0.50.0070.05717.95
7.0.40.0100.08320.31
7.0.30.0200.04720.30
7.0.20.0230.08020.16
7.0.10.0430.06720.00
7.0.00.0070.04320.17
5.6.280.0030.07321.07
5.6.210.0070.04020.46
5.6.200.0170.07018.11
5.6.190.0070.08020.32
5.6.180.4070.04320.61
5.6.170.0200.08720.52
5.6.160.0000.09320.44
5.6.150.0130.07318.19
5.6.140.0070.06718.12
5.6.130.0100.08318.07
5.6.120.0030.05321.09
5.6.110.0100.08021.01
5.6.100.0070.07321.13
5.6.90.0100.08321.12
5.6.80.0170.07020.43
5.5.350.0200.08020.46
5.5.340.0000.04718.02
5.5.330.0070.05320.07
5.5.320.0170.05020.30
5.5.310.0370.07020.26
5.5.300.0030.06717.92
5.5.290.0230.06718.02
5.5.280.0070.06320.80
5.5.270.0070.08720.86
5.5.260.0070.08320.77
5.5.250.0170.07320.67
5.5.240.0330.05020.35
5.4.450.0770.05319.45
5.4.440.0300.06319.52
5.4.430.0700.05319.47
5.4.420.1000.04719.56
5.4.410.0730.05319.39
5.4.400.0370.05718.69
5.4.390.0070.06018.63
5.4.380.0130.06318.61
5.4.370.0130.06018.52
5.4.360.0030.06318.53
5.4.350.0040.03711.98
5.4.340.0120.03411.97
5.4.320.0050.03712.46
5.4.310.0060.03812.45
5.4.300.0060.03712.46
5.4.290.0050.04012.45
5.4.280.0040.03612.35
5.4.270.0070.03812.35
5.4.260.0110.03712.35
5.4.250.0070.05718.58
5.4.240.0100.04718.67
5.4.230.0000.06018.86
5.4.220.0130.05318.83
5.4.210.0100.06018.66
5.4.200.0130.06718.67
5.4.190.0030.06718.77
5.4.180.0070.07318.68
5.4.170.0200.03718.79
5.4.160.0130.04718.66
5.4.150.0100.05018.59
5.4.140.0100.05316.47
5.4.130.0130.04316.23
5.4.120.0130.04316.45
5.4.110.0130.04716.41
5.4.100.0130.04316.28
5.4.90.0100.05016.18
5.4.80.0130.06716.27
5.4.70.0070.05716.32
5.4.60.0070.07716.18
5.4.50.0170.06016.30
5.4.40.0130.04016.36
5.4.30.0100.04716.41
5.4.20.0130.04316.14
5.4.10.0130.04716.28
5.4.00.0070.05015.71
5.3.290.0060.04712.80
5.3.280.0130.05314.62
5.3.270.0170.04714.53
5.3.260.0170.04314.67
5.3.250.0030.05314.63
5.3.240.0070.05014.63
5.3.230.0100.04714.70
5.3.220.0130.04314.61
5.3.210.0100.05014.27
5.3.200.0130.04714.34
5.3.190.0000.05714.27
5.3.180.0070.05014.43
5.3.170.0200.04014.34
5.3.160.0100.04714.58
5.3.150.0100.05714.59
5.3.140.0100.05314.71
5.3.130.0170.06314.32
5.3.120.0100.05014.42
5.3.110.0000.06314.64
5.3.100.0170.06014.04
5.3.90.0200.05314.04
5.3.80.0100.05714.03
5.3.70.0070.06714.02
5.3.60.0070.06314.16
5.3.50.0070.07014.05
5.3.40.0030.05313.66
5.3.30.0130.04313.77
5.3.20.0100.04313.63
5.3.10.0100.04313.51
5.3.00.0000.05313.66
5.2.170.0230.04311.17
5.2.160.0100.05311.07
5.2.150.0100.03710.99
5.2.140.0170.03011.09
5.2.130.0070.03711.13
5.2.120.0100.03310.95
5.2.110.0000.04311.02
5.2.100.0170.02711.13
5.2.90.0070.03711.12
5.2.80.0070.04011.03
5.2.70.0000.04311.25
5.2.60.0030.04010.97
5.2.50.0000.04311.18
5.2.40.0070.03711.02
5.2.30.0100.03710.74
5.2.20.0070.04310.85
5.2.10.0100.03310.95
5.2.00.0100.03310.61
5.1.60.0000.03710.24
5.1.50.0030.04010.15
5.1.40.0000.0379.93
5.1.30.0070.03310.33
5.1.20.0100.03010.25
5.1.10.0070.04310.30
5.1.00.0070.03310.07
5.0.50.0070.0278.46
5.0.40.0030.0308.25
5.0.30.0000.0438.07
5.0.20.0130.0238.25
5.0.10.0100.0208.32
5.0.00.0100.0478.12
4.4.90.0000.0236.54
4.4.80.0000.0236.54
4.4.70.0070.0176.54
4.4.60.0000.0236.54
4.4.50.0070.0176.54
4.4.40.0100.0276.54
4.4.30.0070.0176.54
4.4.20.0000.0236.54
4.4.10.0100.0136.54
4.4.00.0070.0306.54
4.3.110.0000.0236.54
4.3.100.0000.0236.54
4.3.90.0000.0236.54
4.3.80.0070.0306.54
4.3.70.0000.0206.54
4.3.60.0070.0206.54
4.3.50.0000.0236.54
4.3.40.0100.0276.54
4.3.30.0070.0206.54
4.3.20.0030.0206.54
4.3.10.0000.0236.54
4.3.00.0100.0236.39

preferences:
65.38 ms | 400 KiB | 5 Q