3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file = new SplTempFileObject(); for ($i = 0; $i < 100; $i++) { $file->fwrite("Foo $i\n"); } $file->seek(50); echo json_encode(array( array('triggerNext' => $file->next(), 'line' => $file->key(), 'contents' => trim($file->current())), array('triggerNext' => $file->next(), 'line' => $file->key(), 'contents' => trim($file->current())), array('triggerNext' => $file->next(), 'line' => $file->key(), 'contents' => trim($file->current())), ), JSON_PRETTY_PRINT);

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.0130.00720.47
8.4.110.0140.00522.46
8.4.100.0140.00617.91
8.4.90.0130.00818.71
8.4.80.0110.00817.72
8.4.70.0110.00917.79
8.4.60.0100.01020.50
8.4.50.0110.00919.56
8.4.40.0080.00317.77
8.4.30.0060.01320.42
8.4.20.0040.01819.51
8.4.10.0100.00719.44
8.3.250.0100.01018.94
8.3.240.0160.00317.13
8.3.230.0100.01116.83
8.3.220.0090.00417.17
8.3.210.0030.00516.78
8.3.200.0040.00416.50
8.3.190.0140.00418.61
8.3.180.0090.00916.48
8.3.170.0090.00917.09
8.3.160.0070.01119.05
8.3.150.0060.00316.75
8.3.140.0090.00317.30
8.3.130.0110.00016.70
8.3.120.0090.00918.90
8.3.110.0040.00420.94
8.3.100.0000.00824.06
8.3.90.0150.00326.77
8.3.80.0030.00616.88
8.3.70.0090.00616.75
8.3.60.0210.00018.18
8.3.50.0090.00620.07
8.3.40.0030.01019.04
8.3.30.0100.00718.71
8.3.20.0000.00724.18
8.3.10.0000.00724.66
8.3.00.0000.00826.16
8.2.290.0080.00820.43
8.2.280.0100.00418.46
8.2.270.0060.00017.17
8.2.260.0050.00318.48
8.2.250.0140.00718.38
8.2.240.0060.00317.34
8.2.230.0040.00422.58
8.2.220.0060.00337.54
8.2.210.0110.00326.77
8.2.200.0090.00016.63
8.2.190.0040.01116.88
8.2.180.0100.01025.92
8.2.170.0140.00719.03
8.2.160.0030.01022.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00226.16
8.2.110.0060.00320.96
8.2.100.0120.00017.84
8.2.90.0050.00317.63
8.2.80.0040.00417.97
8.2.70.0060.00317.93
8.2.60.0000.00918.22
8.2.50.0090.00018.10
8.2.40.0000.00719.52
8.2.30.0000.00717.88
8.2.20.0040.00419.55
8.2.10.0060.00317.76
8.2.00.0000.00719.28
8.1.330.0100.00922.07
8.1.320.0140.00515.94
8.1.310.0140.00320.18
8.1.300.0000.00920.27
8.1.290.0060.00318.88
8.1.280.0140.00725.92
8.1.270.0070.00023.99
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0030.00622.14
8.1.230.0030.00719.14
8.1.220.0080.00017.78
8.1.210.0050.00318.77
8.1.200.0090.00017.23
8.1.190.0060.00317.10
8.1.180.0050.00318.10
8.1.170.0040.00418.91
8.1.160.0070.00022.67
8.1.150.0040.00418.69
8.1.140.0070.00017.54
8.1.130.0000.00717.37
8.1.120.0040.00417.47
8.1.110.0040.00417.50
8.1.100.0040.00417.45
8.1.90.0070.00017.40
8.1.80.0030.00517.45
8.1.70.0030.00317.41
8.1.60.0000.00817.60
8.1.50.0050.00317.51
8.1.40.0050.00317.56
8.1.30.0060.00317.66
8.1.20.0040.00417.71
8.1.10.0050.00617.64
8.1.00.0040.00417.54
8.0.300.0070.00019.77
8.0.290.0070.00016.75
8.0.280.0000.00818.05
8.0.270.0050.00216.92
8.0.260.0030.00316.79
8.0.250.0030.00316.90
8.0.240.0030.00316.96
8.0.230.0070.00017.02
8.0.220.0000.00716.82
8.0.210.0040.00216.81
8.0.200.0030.00316.87
8.0.190.0000.00817.02
8.0.180.0000.00716.98
8.0.170.0080.00316.80
8.0.160.0080.00017.02
8.0.150.0090.00016.95
8.0.140.0050.00516.89
8.0.130.0030.00313.38
8.0.120.0040.00416.77
8.0.110.0070.00016.91
8.0.100.0000.00816.86
8.0.90.0040.00417.00
8.0.80.0000.00717.01
8.0.70.0070.00016.93
8.0.60.0070.00016.95
8.0.50.0090.00016.77
8.0.30.0000.00816.90
8.0.20.0040.00417.05
8.0.10.0000.00717.04
8.0.00.0000.00717.09
7.4.330.0000.00515.55
7.4.320.0040.00416.48
7.4.300.0000.00616.70
7.4.290.0030.00516.61
7.4.280.0020.00516.67
7.4.270.0000.00816.49
7.4.260.0050.00013.38
7.4.250.0000.00716.53
7.4.240.0000.00716.54
7.4.230.0030.00316.63
7.4.220.0080.00016.57
7.4.210.0000.00716.61
7.4.200.0030.00316.74
7.4.190.0070.00016.62
7.4.180.0030.00316.68
7.4.160.0070.00016.62
7.4.150.0040.00416.57
7.4.140.0000.00716.49
7.4.130.0000.00816.46
7.4.120.0000.00716.57
7.4.110.0040.00416.54
7.4.100.0030.00316.49
7.4.90.0040.00416.55
7.4.80.0070.00016.59
7.4.70.0000.00716.37
7.4.60.0030.00316.56
7.4.50.0050.00216.43
7.4.40.0000.00716.52
7.4.30.0000.00716.42
7.4.20.0030.00316.59
7.4.10.0030.00316.50
7.4.00.0000.00716.57
7.3.330.0070.00016.21
7.3.320.0040.00413.13
7.3.310.0030.00316.30
7.3.300.0000.00716.34
7.3.290.0030.00316.30
7.3.280.0030.00316.24
7.3.270.0000.00816.46
7.3.260.0000.00716.39
7.3.250.0000.00716.46
7.3.240.0030.00316.53
7.3.230.0030.00316.23
7.3.220.0030.00316.21
7.3.210.0030.00316.30
7.3.200.0000.00616.09
7.3.190.0040.00416.07
7.3.180.0040.00416.33
7.3.170.0040.00416.33
7.3.160.0060.00316.23
7.3.150.0030.00316.34
7.3.140.0000.00716.23
7.3.130.0030.00316.09
7.3.120.0040.00416.16
7.3.110.0060.00016.11
7.3.100.0030.00316.11
7.3.90.0080.00016.63
7.3.80.0060.00016.37
7.3.70.0030.00316.23
7.3.60.0030.00316.56
7.3.50.0000.00716.36
7.3.40.0020.00516.29
7.3.30.0000.00716.58
7.3.20.0050.00216.55
7.3.10.0000.00816.36
7.3.00.0000.00716.45
7.2.340.0070.00016.40
7.2.330.0030.00416.42
7.2.320.0040.00416.30
7.2.310.0080.00016.46
7.2.300.0030.00316.30
7.2.290.0000.00816.50
7.2.280.0070.00016.38
7.2.270.0040.00416.55
7.2.260.0000.00816.36
7.2.250.0020.00516.53
7.2.240.0080.00016.28
7.2.230.0050.00316.44
7.2.220.0050.00216.31
7.2.210.0080.00016.51
7.2.200.0040.00416.43
7.2.190.0000.00816.56
7.2.180.0080.00016.40
7.2.170.0040.00416.71
7.2.160.0040.00416.41
7.2.150.0040.00416.66
7.2.140.0040.00416.52
7.2.130.0080.00016.70
7.2.120.0000.00816.72
7.2.110.0020.00516.77
7.2.100.0040.00416.81
7.2.90.0040.00416.66
7.2.80.0040.00416.64
7.2.70.0000.00816.70
7.2.60.0000.00816.79
7.2.50.0080.00016.66
7.2.40.0050.00316.64
7.2.30.0040.00416.78
7.2.20.0030.00516.64
7.2.10.0100.01016.81
7.2.00.0060.00316.78
7.1.330.0000.00815.55
7.1.320.0070.00015.68
7.1.310.0000.00715.33
7.1.300.0040.00415.36
7.1.290.0070.00015.67
7.1.280.0040.00415.44
7.1.270.0070.00015.41
7.1.260.0020.00515.47
7.1.250.0000.00815.47
7.1.240.0040.00415.27
7.1.230.0040.00415.45
7.1.220.0050.00215.49
7.1.210.0040.00415.33
7.1.200.0040.00415.58
7.1.190.0030.00315.46
7.1.180.0040.00415.36
7.1.170.0030.00315.46
7.1.160.0000.00715.41
7.1.150.0040.00415.37
7.1.140.0020.00515.28
7.1.130.0150.00615.52
7.1.120.0030.00315.48
7.1.110.0050.00215.50
7.1.100.0030.00615.58
7.1.90.0070.00015.44
7.1.80.0000.00815.71
7.1.70.0000.00915.43
7.1.60.0000.00715.41
7.1.50.0000.00715.48
7.1.40.0020.00515.36
7.1.30.0040.00415.54
7.1.20.0020.00515.37
7.1.10.0050.00215.61
7.1.00.0020.00515.27
7.0.330.0050.00215.30
7.0.320.0070.00015.23
7.0.310.0040.00415.17
7.0.300.0030.00315.13
7.0.290.0000.00715.06
7.0.280.0000.00715.17
7.0.270.0030.00314.96
7.0.260.0000.00715.06
7.0.250.0080.00515.39
7.0.240.0000.00815.24
7.0.230.0000.00715.25
7.0.220.0070.00015.30
7.0.210.0030.00315.31
7.0.200.0030.00315.18
7.0.190.0000.00915.31
7.0.180.0000.00815.10
7.0.170.0000.00715.27
7.0.160.0050.00315.46
7.0.150.0000.00815.35
7.0.140.0050.00315.34
7.0.130.0040.00415.18
7.0.120.0070.00015.31
7.0.110.0070.00015.07
7.0.100.0030.00315.22
7.0.90.0070.00015.00
7.0.80.0000.00715.28
7.0.70.0070.00015.16
7.0.60.0100.00515.03
7.0.50.0000.00715.22
7.0.40.0000.00715.05
7.0.30.0070.00015.09
7.0.20.0000.00715.13
7.0.10.0070.00015.08
7.0.00.0000.00715.29
5.6.400.0030.00315.82
5.6.390.0000.00615.69
5.6.380.0070.00015.87
5.6.370.0070.00015.66
5.6.360.0040.00415.66
5.6.350.0020.00515.65
5.6.340.0030.00515.83
5.6.330.0000.00615.86
5.6.320.0000.00615.78
5.6.310.0000.00715.67
5.6.300.0030.00315.70
5.6.290.0020.00415.67
5.6.280.0000.00715.77
5.6.270.0070.00015.75
5.6.260.0070.00015.81
5.6.250.0000.00715.83
5.6.240.0000.00715.72
5.6.230.0030.00315.87
5.6.220.0000.00615.82
5.6.210.0050.00215.94
5.6.200.0020.00415.94
5.6.190.0040.00216.00
5.6.180.0000.00715.88
5.6.170.0000.00715.84
5.6.160.0070.00016.00
5.6.150.0080.00016.00
5.6.140.0000.00715.93
5.6.130.0070.00015.93
5.6.120.0040.00415.95
5.6.110.0050.00215.76
5.6.100.0070.00015.94
5.6.90.0020.00415.68
5.6.80.0000.00615.68
5.6.70.0050.00215.91
5.6.60.0000.00615.93
5.6.50.0030.00315.86
5.6.40.0030.00315.90
5.6.30.0000.00615.93
5.6.20.0030.00315.59
5.6.10.0040.00215.81
5.6.00.0030.00315.85
5.5.380.0040.00415.91
5.5.370.0000.00715.76
5.5.360.0040.00415.59
5.5.350.0000.00715.70
5.5.340.0040.00415.57
5.5.330.0040.00415.57
5.5.320.0000.00615.88
5.5.310.0060.00015.89
5.5.300.0000.00615.67
5.5.290.0020.00415.57
5.5.280.0060.00015.86
5.5.270.0070.00015.72
5.5.260.0060.00015.80
5.5.250.0040.00415.85
5.5.240.0000.00715.90
5.5.230.0030.00315.89
5.5.220.0080.00015.69
5.5.210.0070.00015.86
5.5.200.0000.00715.52
5.5.190.0040.00415.48
5.5.180.0030.00315.78
5.5.170.0000.00715.60
5.5.160.0020.00515.57
5.5.150.0030.00315.51
5.5.140.0040.00415.48
5.5.130.0070.00015.46
5.5.120.0050.00215.39
5.5.110.0060.00015.65
5.5.100.0040.00415.88
5.5.90.0020.00515.75
5.5.80.0070.00015.87
5.5.70.0030.00315.59
5.5.60.0000.00715.93
5.5.50.0000.00615.93
5.5.40.0030.00315.89
5.5.30.0070.00015.90
5.5.20.0000.00615.77
5.5.10.0000.00615.65
5.5.00.0000.00715.66
5.4.450.0000.00512.63
5.4.440.0000.00612.60
5.4.430.0030.00312.63
5.4.420.0050.00012.48
5.4.410.0000.00512.63
5.4.400.0050.00012.48
5.4.390.0020.00212.50
5.4.380.0000.00612.49
5.4.370.0000.00612.45
5.4.360.0060.00012.57
5.4.350.0020.00212.59
5.4.340.0030.00312.42
5.4.330.0060.00012.34
5.4.320.0000.00512.53
5.4.310.0000.00612.63
5.4.300.0050.00012.52
5.4.290.0020.00212.40
5.4.280.0000.00612.69
5.4.270.0030.00312.48
5.4.260.0000.00512.33
5.4.250.0060.00012.32
5.4.240.0000.00512.63
5.4.230.0020.00212.37
5.4.220.0000.00512.37
5.4.210.0050.00012.33
5.4.200.0030.00312.32
5.4.190.0000.00512.52
5.4.180.0000.00512.33
5.4.170.0030.00312.50
5.4.160.0000.00512.29
5.4.150.0000.00512.39
5.4.140.0050.00012.70
5.4.130.0030.00312.52
5.4.120.0050.00012.46
5.4.110.0000.00512.58
5.4.100.0000.00512.61
5.4.90.0000.00512.59
5.4.80.0050.00012.63
5.4.70.0000.00512.52
5.4.60.0000.00512.50
5.4.50.0050.00012.68
5.4.40.0020.00212.55
5.4.30.0050.00012.54
5.4.20.0060.00012.68
5.4.10.0050.00012.82
5.4.00.0050.00012.50
5.3.290.0050.00013.01
5.3.280.0050.00012.93
5.3.270.0000.00513.20
5.3.260.0030.00312.92
5.3.250.0030.00312.94
5.3.240.0030.00313.07
5.3.230.0000.00512.93
5.3.220.0000.00612.87
5.3.210.0030.00313.21
5.3.200.0000.00513.22
5.3.190.0030.00313.21
5.3.180.0030.00313.38
5.3.170.0000.00713.34
5.3.160.0030.00313.39
5.3.150.0000.00513.17
5.3.140.0050.00013.11
5.3.130.0000.00513.26
5.3.120.0050.00012.97
5.3.110.0030.00312.95
5.3.100.0050.00012.97
5.3.90.0050.00013.16
5.3.80.0000.00513.18
5.3.70.0000.00612.87
5.3.60.0020.00213.19
5.3.50.0000.00612.88
5.3.40.0030.00313.02
5.3.30.0000.00513.09
5.3.20.0000.00613.08
5.3.10.0000.00613.08
5.3.00.0020.00212.97
5.2.170.0030.00312.22
5.2.160.0000.00412.01
5.2.150.0050.00012.05
5.2.140.0000.00411.93
5.2.130.0050.00011.92
5.2.120.0000.00412.10
5.2.110.0020.00212.06
5.2.100.0050.00011.88
5.2.90.0000.00511.89
5.2.80.0000.00511.80
5.2.70.0000.00611.82
5.2.60.0000.00411.79
5.2.50.0020.00212.14
5.2.40.0000.00412.11
5.2.30.0000.00411.77
5.2.20.0040.00011.88
5.2.10.0000.00411.71
5.2.00.0020.00211.64
5.1.60.0000.00411.14
5.1.50.0040.00011.14
5.1.40.0000.00411.26
5.1.30.0050.00011.26
5.1.20.0050.00011.14
5.1.10.0040.00011.14
5.1.00.0000.00411.14
5.0.50.0020.00211.14
5.0.40.0000.00411.14
5.0.30.0000.00411.14
5.0.20.0000.00411.14
5.0.10.0040.00011.14
5.0.00.0000.00411.14
4.4.90.0000.00311.14
4.4.80.0000.00211.14
4.4.70.0000.00211.14
4.4.60.0000.00211.14
4.4.50.0000.00211.14
4.4.40.0000.00311.14
4.4.30.0000.00311.14
4.4.20.0000.00211.14
4.4.10.0020.00011.14
4.4.00.0000.00211.14
4.3.110.0030.00011.14
4.3.100.0000.00211.14
4.3.90.0000.00211.14
4.3.80.0000.00211.14
4.3.70.0000.00311.14
4.3.60.0000.00211.14
4.3.50.0000.00311.14
4.3.40.0000.00311.14
4.3.30.0000.00211.14
4.3.20.0000.00211.14
4.3.10.0000.00211.14
4.3.00.0020.00011.14

preferences:
38.21 ms | 403 KiB | 5 Q