3v4l.org

run code in 300+ PHP versions simultaneously
<?php //First, use file() to get array of lines from your text file, then... $array_from_file = array('String1', 'String2', 'Stri"ng3'); $array_from_file = array_map(function($x){return $x = '"'.$x.'"';}, $array_from_file); print_r($array_from_file);

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.0140.00016.50
8.3.50.0140.00923.04
8.3.40.0070.01118.85
8.3.30.0130.00019.19
8.3.20.0040.00420.07
8.3.10.0080.00023.53
8.3.00.0080.00019.38
8.2.180.0110.00718.04
8.2.170.0000.01422.96
8.2.160.0170.00720.25
8.2.150.0040.01124.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00521.09
8.2.110.0060.00320.37
8.2.100.0060.00618.03
8.2.90.0040.00419.23
8.2.80.0050.00317.97
8.2.70.0000.00817.38
8.2.60.0070.00017.93
8.2.50.0000.01018.07
8.2.40.0000.00718.09
8.2.30.0040.00418.07
8.2.20.0040.00417.57
8.2.10.0040.00418.13
8.2.00.0040.00417.77
8.1.280.0100.00725.92
8.1.270.0040.00423.67
8.1.260.0000.00726.35
8.1.250.0100.00328.09
8.1.240.0040.00721.93
8.1.230.0040.00719.15
8.1.220.0030.00517.77
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0080.00017.36
8.1.180.0040.00418.10
8.1.170.0040.00418.63
8.1.160.0000.00822.09
8.1.150.0080.00018.89
8.1.140.0020.00517.36
8.1.130.0030.00317.77
8.1.120.0030.00517.47
8.1.110.0000.00717.41
8.1.100.0040.00417.49
8.1.90.0040.00417.45
8.1.80.0070.00017.53
8.1.70.0040.00417.46
8.1.60.0000.00817.58
8.1.50.0000.00817.54
8.1.40.0000.00717.38
8.1.30.0040.00417.49
8.1.20.0050.00317.56
8.1.10.0040.00417.42
8.1.00.0000.00717.43
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0050.00318.30
8.0.270.0000.00717.18
8.0.260.0040.00417.21
8.0.250.0030.00316.97
8.0.240.0040.00416.95
8.0.230.0000.00716.82
8.0.220.0050.00316.85
8.0.210.0030.00316.77
8.0.200.0060.00016.90
8.0.190.0000.00716.98
8.0.180.0060.00316.79
8.0.170.0000.00816.88
8.0.160.0040.00416.82
8.0.150.0000.00716.89
8.0.140.0030.00516.65
8.0.130.0060.00013.30
8.0.120.0040.00416.82
8.0.110.0040.00416.86
8.0.100.0000.00816.75
8.0.90.0070.00016.69
8.0.80.0130.00316.77
8.0.70.0070.00016.77
8.0.60.0070.00016.77
8.0.50.0040.00416.67
8.0.30.0100.01217.15
8.0.20.0140.00617.40
8.0.10.0040.00416.95
8.0.00.0120.00916.89
7.4.330.0000.00615.06
7.4.320.0000.00616.59
7.4.300.0060.00016.55
7.4.290.0000.00816.39
7.4.280.0060.00316.63
7.4.270.0040.00716.60
7.4.260.0070.00016.44
7.4.250.0000.00816.53
7.4.240.0060.00116.47
7.4.230.0080.00016.43
7.4.220.0110.00616.55
7.4.210.0090.01216.68
7.4.200.0000.00816.66
7.4.160.0030.01316.43
7.4.150.0150.00617.40
7.4.140.0090.00917.86
7.4.130.0100.00616.36
7.4.120.0100.01016.50
7.4.110.0100.00616.42
7.4.100.0100.00716.34
7.4.90.0130.00316.48
7.4.80.0030.01319.39
7.4.70.0140.00416.41
7.4.60.0070.01116.50
7.4.50.0000.00816.54
7.4.40.0130.00316.35
7.4.30.0030.01216.42
7.4.00.0100.00715.12
7.3.330.0030.00313.26
7.3.320.0070.00013.22
7.3.310.0070.00016.25
7.3.300.0000.00816.17
7.3.290.0070.01416.29
7.3.280.0050.01216.28
7.3.270.0040.01217.40
7.3.260.0110.01316.47
7.3.250.0140.00516.38
7.3.240.0070.01116.54
7.3.230.0040.01316.39
7.3.210.0110.00516.30
7.3.200.0110.00719.39
7.3.190.0040.01616.34
7.3.180.0130.00316.32
7.3.170.0060.00916.32
7.3.160.0130.00316.31
7.3.10.0070.00616.45
7.3.00.0040.01016.33
7.2.330.0080.00816.34
7.2.320.0090.00816.68
7.2.310.0030.01416.55
7.2.300.0070.01016.71
7.2.290.0130.00316.69
7.2.130.0080.01116.66
7.2.120.0060.00716.71
7.2.110.0050.00716.66
7.2.100.0080.00516.56
7.2.90.0070.00716.83
7.2.80.0090.00616.59
7.2.70.0060.00816.60
7.2.60.0090.00716.49
7.2.50.0120.00416.73
7.2.40.0050.01116.83
7.2.30.0060.00816.70
7.2.20.0090.00816.84
7.2.10.0040.01116.73
7.2.00.0080.00816.68
7.1.250.0120.00315.50
7.1.100.0000.01518.06
7.1.70.0030.00717.17
7.1.60.0030.02119.46
7.1.50.0070.01316.63
7.1.00.0070.07022.28
7.0.200.0120.00616.88
7.0.140.0130.06322.12
7.0.60.0100.04320.00
7.0.50.0070.08017.87
7.0.40.0030.04320.23
7.0.30.0270.03320.20
7.0.20.0200.04320.46
7.0.10.0130.03720.07
7.0.00.0100.04720.16
5.6.280.0070.07021.15
5.6.210.0100.08020.50
5.6.200.0100.05718.16
5.6.190.0070.04720.63
5.6.180.0430.07020.55
5.6.170.0300.03720.57
5.6.160.0100.04320.56
5.6.150.0130.06318.27
5.6.140.0030.05318.23
5.6.130.0070.06718.21
5.6.120.0130.07721.04
5.6.110.0070.08721.02
5.6.100.0030.04320.89
5.6.90.0030.04320.96
5.6.80.0130.06020.39
5.6.70.4130.03020.40
5.5.350.0200.08020.41
5.5.340.0030.08718.09
5.5.330.0170.07320.32
5.5.320.0370.06720.51
5.5.310.0200.04320.41
5.5.300.0070.03717.95
5.5.290.0070.04017.96
5.5.280.0100.04320.98
5.5.270.0070.05720.64
5.5.260.0070.08020.75
5.5.250.0100.07720.77
5.5.240.0230.07020.26
5.4.450.0570.03719.49
5.4.440.0370.04019.48
5.4.430.0300.04319.37
5.4.420.0330.03319.30
5.4.410.0330.04319.16
5.4.400.0500.03719.23
5.4.390.0070.02719.09
5.4.380.0370.06018.78
5.4.370.0230.06318.61
5.4.360.0470.06718.59
5.4.350.0430.04718.50
5.4.340.0330.06318.53
5.4.320.0050.03612.50
5.4.310.0060.03812.50
5.4.300.0090.03412.51
5.4.290.0040.04012.50
5.4.280.0050.03612.39
5.4.270.0080.04112.40
5.4.260.0060.04112.40
5.4.250.0100.03412.39
5.4.240.0040.05112.39
5.4.230.0060.03812.38
5.4.220.0080.03412.39
5.4.210.0050.03712.39
5.4.200.0070.03912.39
5.4.190.0090.03312.38
5.4.180.0070.04312.38
5.4.170.0040.03912.40
5.4.160.0050.03812.39
5.4.150.0070.03412.38
5.4.140.0060.03712.07
5.4.130.0090.03512.05
5.4.120.0040.03612.02
5.4.110.0040.03712.01
5.4.100.0060.03412.02
5.4.90.0040.03812.01
5.4.80.0070.03412.01
5.4.70.0050.03512.01
5.4.60.0090.03112.01
5.4.50.0090.04312.01
5.4.40.0070.03412.00
5.4.30.0060.03511.99
5.4.20.0060.03511.99
5.4.10.0040.03711.99
5.4.00.0060.03411.48
5.3.290.0070.03812.80
5.3.280.0070.03612.71
5.3.270.0060.03812.72
5.3.260.0090.03512.72
5.3.250.0060.03712.71
5.3.240.0060.03912.71
5.3.230.0050.03912.71
5.3.220.0060.03712.68
5.3.210.0080.03512.68
5.3.200.0020.04012.68
5.3.190.0040.03912.68
5.3.180.0030.03912.67
5.3.170.0100.03212.66
5.3.160.0030.03912.67
5.3.150.0040.03812.67
5.3.140.0080.03812.66
5.3.130.0040.04412.66
5.3.120.0050.03912.66
5.3.110.0090.03812.65
5.3.100.0110.03412.12
5.3.90.0040.04312.10
5.3.80.0050.04512.09
5.3.70.0080.03712.09
5.3.60.0050.03712.07
5.3.50.0030.03812.02
5.3.40.0050.03612.02
5.3.30.0080.03211.98
5.3.20.0030.03711.76
5.3.10.0070.03911.73
5.3.00.0030.03811.72
5.2.170.0070.0349.18
5.2.160.0040.0299.18
5.2.150.0030.0369.18
5.2.140.0010.0339.18
5.2.130.0050.0279.14
5.2.120.0030.0299.14
5.2.110.0030.0299.15
5.2.100.0030.0289.14
5.2.90.0070.0269.14
5.2.80.0050.0299.14
5.2.70.0040.0299.13
5.2.60.0050.0289.09
5.2.50.0060.0279.06
5.2.40.0040.0289.04
5.2.30.0060.0269.02
5.2.20.0020.0309.01
5.2.10.0050.0268.93
5.2.00.0060.0298.78
5.1.60.0050.0258.07
5.1.50.0050.0258.06
5.1.40.0030.0258.05
5.1.30.0060.0248.40
5.1.20.0070.0248.42
5.1.10.0060.0238.14
5.1.00.0050.0238.14
5.0.50.0060.0176.62
5.0.40.0040.0186.48
5.0.30.0040.0306.29
5.0.20.0020.0206.26
5.0.10.0060.0166.24
5.0.00.0020.0316.23
4.4.90.0030.0144.78
4.4.80.0020.0164.76
4.4.70.0000.0184.76
4.4.60.0010.0164.75
4.4.50.0020.0154.77
4.4.40.0020.0254.71
4.4.30.0030.0154.76
4.4.20.0010.0174.85
4.4.10.0060.0124.85
4.4.00.0020.0264.75
4.3.110.0020.0164.67
4.3.100.0030.0154.66
4.3.90.0020.0154.64
4.3.80.0020.0244.58
4.3.70.0030.0144.63
4.3.60.0030.0134.63
4.3.50.0020.0164.63
4.3.40.0040.0234.53
4.3.30.0030.0163.29
4.3.20.0010.0173.27
4.3.10.0010.0173.22
4.3.00.0000.01715.71

preferences:
48.9 ms | 401 KiB | 5 Q