3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fileHandle = fopen("php://memory", "w+"); $params = array('level' => 6, 'window' => 15, 'memory' => 9); //stream_filter_append($fileHandle, "string.rot13", STREAM_FILTER_WRITE, $params); stream_filter_append($fileHandle, 'zlib.deflate', STREAM_FILTER_WRITE, $params); $string = "Each of these code fragments is very simple, and easy to read and understand. One produces a character at a time by calling emit(); the other consumes a character at a time by calling getchar(). If only the calls to emit() and the calls to getchar() could be made to feed data to each other, it would be simple to connect the two fragments together so that the output from the decompressor went straight to the parser. In many modern operating systems, you could do this using pipes between two processes or two threads. emit() in the decompressor writes to a pipe, and getchar() in the parser reads from the other end of the same pipe. Simple and robust, but also heavyweight and not portable. Typically you don't want to have to divide your program into threads for a task this simple."; fwrite($fileHandle, $string); echo "Current position is: ".ftell($fileHandle)."\n"; rewind($fileHandle); //fseek($fileHandle, 0); //echo stream_get_contents($fileHandle); //echo "file position: ".filesize($fileHandle)."\n"; //echo "strlen = : ".strlen($string); fpassthru($fileHandle);

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.130.0130.00717.85
8.4.120.0120.00822.41
8.4.110.0120.00818.96
8.4.100.0120.00918.18
8.4.90.0100.01017.90
8.4.80.0040.00620.44
8.4.70.0100.01319.66
8.4.60.0100.01119.32
8.4.50.0100.00718.79
8.4.40.0120.00817.51
8.4.30.0030.00617.98
8.4.20.0160.00017.63
8.4.10.0130.00317.65
8.3.260.0090.01016.60
8.3.250.0140.00419.09
8.3.240.0090.00716.58
8.3.230.0050.00416.88
8.3.220.0080.00318.95
8.3.210.0050.00718.25
8.3.200.0140.00519.04
8.3.190.0140.00717.30
8.3.180.0120.00917.13
8.3.170.0110.00820.79
8.3.160.0040.00416.81
8.3.150.0090.00917.39
8.3.140.0080.00018.58
8.3.130.0040.00416.86
8.3.120.0070.01119.17
8.3.110.0080.00020.94
8.3.100.0100.00016.64
8.3.90.0070.00016.46
8.3.80.0030.00616.75
8.3.70.0110.00716.88
8.3.60.0140.00718.31
8.3.50.0050.01622.88
8.3.40.0180.00718.87
8.3.30.0140.00319.29
8.3.20.0100.00720.46
8.3.10.0060.00320.67
8.3.00.0030.00519.15
8.2.290.0120.00720.54
8.2.280.0050.00616.64
8.2.270.0100.01017.12
8.2.260.0060.01220.39
8.2.250.0090.00018.26
8.2.240.0000.00918.76
8.2.230.0070.01022.58
8.2.220.0030.00624.06
8.2.210.0180.00026.77
8.2.200.0030.00616.75
8.2.190.0040.01116.88
8.2.180.0040.01125.92
8.2.170.0090.00922.96
8.2.160.0100.00720.65
8.2.150.0150.00024.18
8.2.140.0090.00024.66
8.2.130.0000.00826.16
8.2.120.0160.00319.23
8.2.110.0070.00319.33
8.2.100.0090.00317.84
8.2.90.0060.00318.34
8.2.80.0000.00818.16
8.2.70.0050.00518.05
8.2.60.0040.00418.16
8.2.50.0030.00618.07
8.2.40.0050.00318.16
8.2.30.0050.00221.30
8.2.20.0040.00417.88
8.2.10.0070.00018.29
8.2.00.0000.00817.83
8.1.330.0140.00616.99
8.1.320.0130.00616.32
8.1.310.0000.00817.93
8.1.300.0060.00318.72
8.1.290.0100.00018.88
8.1.280.0190.00325.92
8.1.270.0050.00523.65
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.50
8.1.230.0030.00922.69
8.1.220.0040.00417.91
8.1.210.0040.00419.04
8.1.200.0040.00417.48
8.1.190.0040.00417.47
8.1.180.0080.00018.10
8.1.170.0040.00418.77
8.1.160.0040.00419.02
8.1.150.0040.00419.09
8.1.140.0040.00417.57
8.1.130.0000.00718.12
8.1.120.0040.00417.69
8.1.110.0030.00617.70
8.1.100.0030.00317.55
8.1.90.0040.00317.62
8.1.80.0040.00417.55
8.1.70.0030.00317.59
8.1.60.0040.00417.67
8.1.50.0030.00517.57
8.1.40.0040.00417.58
8.1.30.0040.00417.87
8.1.20.0000.00817.80
8.1.10.0000.00817.71
8.1.00.0050.00217.64
8.0.300.0040.00420.26
8.0.290.0040.00417.13
8.0.280.0080.00018.71
8.0.270.0070.00017.56
8.0.260.0030.00317.51
8.0.250.0070.00017.25
8.0.240.0030.00317.23
8.0.230.0050.00217.23
8.0.220.0070.00017.05
8.0.210.0000.00717.14
8.0.200.0040.00417.22
8.0.190.0060.00317.21
8.0.180.0000.00817.16
8.0.170.0040.00417.01
8.0.160.0000.00717.00
8.0.150.0000.00717.11
8.0.140.0000.00817.00
8.0.130.0030.00313.60
8.0.120.0050.00317.08
8.0.110.0040.00416.99
8.0.100.0000.00717.09
8.0.90.0000.00717.02
8.0.80.0000.01517.11
8.0.70.0000.00817.13
8.0.60.0000.00717.14
8.0.50.0000.00717.08
8.0.30.0090.01117.30
8.0.20.0110.00817.40
8.0.10.0000.00816.93
8.0.00.0060.01116.85
7.4.330.0000.00515.02
7.4.320.0030.00316.74
7.4.300.0000.00716.71
7.4.290.0000.00716.77
7.4.280.0000.00716.63
7.4.270.0000.00816.69
7.4.260.0040.00416.48
7.4.250.0060.00316.70
7.4.240.0000.00716.70
7.4.230.0070.00016.51
7.4.220.0120.00616.73
7.4.210.0100.01016.83
7.4.200.0000.00816.62
7.4.160.0110.00416.67
7.4.150.0060.01317.40
7.4.140.0100.01117.86
7.4.130.0080.01116.60
7.4.120.0080.00916.76
7.4.110.0040.01316.75
7.4.100.0070.01416.70
7.4.90.0100.01016.65
7.4.80.0120.00616.71
7.4.70.0100.01116.68
7.4.60.0060.01616.73
7.4.50.0030.00616.60
7.4.40.0070.01016.51
7.4.30.0080.01116.68
7.4.10.0130.00714.94
7.4.00.0080.00815.06
7.3.330.0000.00513.26
7.3.320.0030.00313.29
7.3.310.0070.00016.50
7.3.300.0040.00416.48
7.3.290.0090.01016.43
7.3.280.0100.00816.45
7.3.270.0240.01117.40
7.3.260.0100.00716.59
7.3.250.0110.00916.59
7.3.240.0090.01216.48
7.3.230.0130.01116.69
7.3.210.0000.01616.26
7.3.200.0100.01319.39
7.3.190.0040.01716.28
7.3.180.0100.00516.40
7.3.170.0160.00016.58
7.3.160.0110.00516.42
7.3.130.0090.00915.23
7.3.120.0130.00614.90
7.3.110.0030.01415.08
7.3.100.0030.00615.00
7.3.90.0070.00415.04
7.3.80.0120.00415.08
7.3.70.0000.01115.11
7.3.60.0060.00615.00
7.3.50.0000.01015.00
7.3.40.0060.00315.02
7.3.30.0040.00814.72
7.3.20.0080.00016.74
7.3.10.0030.00616.52
7.3.00.0060.00616.54
7.2.330.0120.01217.10
7.2.320.0090.00916.95
7.2.310.0120.00616.91
7.2.300.0100.01016.68
7.2.290.0030.01616.71
7.2.260.0080.00815.16
7.2.250.0070.01415.32
7.2.240.0090.00614.83
7.2.230.0070.00715.12
7.2.220.0000.01715.46
7.2.210.0030.01415.53
7.2.200.0070.00714.91
7.2.190.0120.00615.18
7.2.180.0070.00715.22
7.2.170.0000.00915.03
7.2.160.0060.00915.37
7.2.150.0040.00417.08
7.2.140.0070.01016.88
7.2.130.0000.01416.87
7.2.120.0070.00717.02
7.2.110.0070.00716.96
7.2.100.0020.01417.05
7.2.90.0080.00417.00
7.2.80.0060.00617.05
7.2.70.0030.00616.84
7.2.60.0040.00417.03
7.2.50.0000.01116.73
7.2.40.0000.00917.09
7.2.30.0040.00717.11
7.2.20.0070.01017.09
7.2.10.0060.00916.80
7.2.00.0050.00818.08
7.1.330.0030.01115.73
7.1.320.0070.00715.82
7.1.310.0060.00315.94
7.1.300.0030.00615.75
7.1.290.0060.00615.72
7.1.280.0070.00715.75
7.1.270.0120.00015.63
7.1.260.0030.01015.82
7.1.250.0090.00015.77
7.1.240.0070.00715.78
7.1.230.0060.00915.65
7.1.220.0120.00315.76
7.1.210.0000.01315.74
7.1.200.0040.01115.87
7.1.190.0040.00415.56
7.1.180.0070.00715.89
7.1.170.0030.00915.61
7.1.160.0030.00615.91
7.1.150.0030.01315.42
7.1.140.0070.00715.63
7.1.130.0080.00315.83
7.1.120.0070.01015.72
7.1.110.0100.00615.53
7.1.100.0050.00716.96
7.1.90.0070.00715.57
7.1.80.0070.01015.56
7.1.70.0050.00516.55
7.1.60.0080.01217.45
7.1.50.0180.01024.99
7.1.40.0100.00715.84
7.1.30.0030.01215.82
7.1.20.0070.00715.78
7.1.10.0060.01015.74
7.1.00.0050.04018.99
7.0.330.0070.00315.19
7.0.320.0030.00615.05
7.0.310.0060.00615.48
7.0.300.0060.00615.51
7.0.290.0030.01315.29
7.0.280.0040.01115.18
7.0.270.0090.00315.19
7.0.260.0090.00615.29
7.0.250.0030.01015.55
7.0.240.0090.00015.36
7.0.230.0040.01115.25
7.0.220.0030.00815.14
7.0.210.0030.00915.18
7.0.200.0020.01015.93
7.0.190.0090.00615.43
7.0.180.0070.00715.57
7.0.170.0040.01115.45
7.0.160.0040.00415.39
7.0.150.0060.00315.27
7.0.140.0090.03618.62
7.0.130.0030.01015.24
7.0.120.0060.00915.26
7.0.110.0060.00915.41
7.0.100.0040.00715.52
7.0.90.0040.00815.33
7.0.80.0000.01515.39
7.0.70.0000.01115.48
7.0.60.0070.03417.68
7.0.50.0060.02316.79
7.0.40.0080.03216.77
7.0.30.0190.02716.85
7.0.20.0170.02516.84
7.0.10.0100.04416.95
7.0.00.0100.04016.88
5.6.400.0040.01114.70
5.6.390.0080.00414.51
5.6.380.0070.00314.42
5.6.370.0120.00314.64
5.6.360.0000.01414.36
5.6.350.0110.00414.61
5.6.340.0120.00314.48
5.6.330.0060.00814.28
5.6.320.0040.01114.57
5.6.310.0120.00314.56
5.6.300.0070.01014.45
5.6.290.0060.00314.42
5.6.280.0080.03718.05
5.6.270.0110.00314.85
5.6.260.0030.01014.44
5.6.250.0030.00614.68
5.6.240.0040.00814.55
5.6.230.0040.01114.58
5.6.220.0030.00914.47
5.6.210.0060.04317.63
5.6.200.0020.04816.53
5.6.190.0050.04917.44
5.6.180.0070.02017.71
5.6.170.0150.02317.49
5.6.160.0070.03317.51
5.6.150.0050.02716.33
5.6.140.0030.04316.40
5.6.130.0070.04016.32
5.6.120.0080.04217.91
5.6.110.0110.03917.86
5.6.100.0040.04117.72
5.6.90.0020.03018.04
5.6.80.0110.04017.68
5.6.70.0130.00314.34
5.6.60.0130.00314.40
5.6.50.0040.01114.68
5.6.40.0030.01014.41
5.6.30.0000.01414.67
5.6.20.0000.00914.52
5.6.10.0030.00714.57
5.6.00.0030.01314.30
5.5.380.0040.00814.46
5.5.370.0050.00514.46
5.5.360.0080.00814.67
5.5.350.0090.04217.58
5.5.340.0100.04216.15
5.5.330.0110.04317.47
5.5.320.0070.02917.34
5.5.310.0170.03717.33
5.5.300.0150.02316.21
5.5.290.0100.01816.28
5.5.280.0030.04717.80
5.5.270.0100.02317.80
5.5.260.0100.02517.79
5.5.250.0050.04417.61
5.5.240.0200.04017.34
5.5.230.0030.01014.29
5.5.220.0060.00914.55
5.5.210.0070.00714.31
5.5.200.0090.00614.32
5.5.190.0030.01014.39
5.5.180.0000.01014.46
5.5.170.0030.00714.41
5.5.160.0030.00914.50
5.5.150.0090.00914.32
5.5.140.0030.00714.28
5.5.130.0090.00314.54
5.5.120.0090.00314.30
5.5.110.0100.00614.49
5.5.100.0090.00614.61
5.5.90.0060.00914.18
5.5.80.0110.00014.55
5.5.70.0040.01114.34
5.5.60.0060.00614.23
5.5.50.0000.01214.38
5.5.40.0030.00714.44
5.5.30.0050.00314.52
5.5.20.0060.00314.22
5.5.10.0040.00414.52
5.5.00.0000.01414.43
5.4.450.0390.03215.31
5.4.440.0520.03115.38
5.4.430.0500.03515.30
5.4.420.0060.03315.34
5.4.410.0050.03415.36
5.4.400.0040.03415.19
5.4.390.0070.03115.14
5.4.380.0020.03515.05
5.4.370.0040.03315.07
5.4.360.0100.02715.27
5.4.350.0060.02211.61
5.4.340.0050.02711.60
5.4.330.0030.00310.98
5.4.320.0050.02911.88
5.4.310.0090.04111.99
5.4.300.0070.02811.89
5.4.290.0050.02911.88
5.4.280.0080.03411.88
5.4.270.0080.02711.78
5.4.260.0100.03211.91
5.4.250.0090.02311.77
5.4.240.0030.02511.78
5.4.230.0030.03211.71
5.4.220.0040.02611.65
5.4.210.0030.02311.85
5.4.200.0040.03211.79
5.4.190.0080.02411.76
5.4.180.0050.02711.79
5.4.170.0060.02711.79
5.4.160.0050.02411.72
5.4.150.0090.02511.79
5.4.140.0070.02011.71
5.4.130.0040.02211.66
5.4.120.0060.02311.63
5.4.110.0020.02411.73
5.4.100.0080.01911.64
5.4.90.0050.02011.70
5.4.80.0060.02011.64
5.4.70.0040.02211.75
5.4.60.0050.02111.63
5.4.50.0070.02611.61
5.4.40.0050.02111.50
5.4.30.0040.02511.74
5.4.20.0040.02211.44
5.4.10.0040.01911.64
5.4.00.0090.01611.39
5.3.290.0050.04012.89
5.3.280.0060.03812.82
5.3.270.0040.04412.83
5.3.260.0020.04412.82
5.3.250.0070.03712.82
5.3.240.0090.04512.81
5.3.230.0040.04212.81
5.3.220.0100.03212.78
5.3.210.0100.03612.78
5.3.200.0100.03612.77
5.3.190.0060.05612.78
5.3.180.0060.04312.77
5.3.170.0040.04012.78
5.3.160.0070.03512.77
5.3.150.0030.04112.77
5.3.140.0030.04412.77
5.3.130.0100.05712.76
5.3.120.0070.04212.76
5.3.110.0070.04012.76
5.3.100.0070.03812.25
5.3.90.0070.04112.23
5.3.80.0060.04312.22
5.3.70.0060.03612.23
5.3.60.0050.03612.21
5.3.50.0030.04212.16
5.3.40.0050.03812.16
5.3.30.0080.03512.12
5.3.20.0040.03911.91
5.3.10.0070.03611.86
5.3.00.0060.03711.85
5.2.170.0050.0349.35
5.2.160.0030.0349.35
5.2.150.0060.0309.35
5.2.140.0010.0349.38
5.2.130.0030.0349.31
5.2.120.0040.0339.31
5.2.110.0060.0289.32
5.2.100.0050.0379.31
5.2.90.0070.0399.32
5.2.80.0100.0389.31
5.2.70.0100.0379.32
5.2.60.0100.0419.25
5.2.50.0070.0399.23
5.2.40.0060.0309.20
5.2.30.0050.0329.18
5.2.20.0090.0369.18
5.2.10.0080.0289.10
5.2.00.0030.0368.97
5.1.60.0040.0288.26
5.1.50.0030.0268.25
5.1.40.0040.0298.23
5.1.30.0040.0278.39
5.1.20.0040.0338.42
5.1.10.0080.0308.15
5.1.00.0070.0288.15
5.0.50.0030.0256.62
5.0.40.0050.0216.48
5.0.30.0030.0336.29
5.0.20.0030.0206.26
5.0.10.0020.0216.25
5.0.00.0030.0326.23
4.4.90.0000.0184.78
4.4.80.0050.0144.76
4.4.70.0040.0184.75
4.4.60.0030.0184.76
4.4.50.0050.0154.77
4.4.40.0040.0274.70
4.4.30.0030.0174.76
4.4.20.0050.0154.85
4.4.10.0020.0184.85
4.4.00.0100.0564.75
4.3.110.0040.0164.67
4.3.100.0030.0164.66
4.3.90.0030.0164.64
4.3.80.0050.0354.58
4.3.70.0050.0174.63
4.3.60.0040.0184.63
4.3.50.0050.0174.63
4.3.40.0040.0234.54
4.3.30.0010.0173.36
4.3.20.0020.0163.36
4.3.10.0020.0183.36
4.3.00.0070.0337.11

preferences:
37.56 ms | 403 KiB | 5 Q