3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data= '"CIEL3.SA",35.10,"SAO","+4.71%",+1.58,35.85,34.00,"34.00 - 35.85",8637900,"BRL","3/17/2016","5:08pm"'; $properties=explode(",",$data); $fields = array('Symbol', 'LastTradePriceOnly', 'StockExchange', 'ChangeinPercent', 'Change', 'DaysHigh', 'DaysLow', 'DaysRange', 'Volume', 'Currency', 'LastTradeDate', 'LastTradeTime'); foreach ($properties as $key=>$value) { $quotes[] = array ( $fields[$key] => $value ); }; $results = array ( "query" => array ( "results" => array ( "quote" => $quotes ) ) ); echo json_encode($results); $row = 1; $quotes = null; $stream = fopen('data://text/plain;base64,' . base64_encode($data),'r'); while (($data = fgetcsv($stream, 12, ",")) !== FALSE) { $num = count($data); echo "<p> $num campos na linha $row: <br /></p>\n"; $row++; foreach ($data as $key=>$value) { $quotes[] = array ( $fields[$key] => $value ); }; } $results = array ( "query" => array ( "results" => array ( "quote" => $quotes ) ) ); echo json_encode($results);

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.0090.01216.75
8.3.50.0070.01322.11
8.3.40.0140.00018.79
8.3.30.0040.01118.79
8.3.20.0080.00020.13
8.3.10.0080.00021.90
8.3.00.0050.00320.80
8.2.180.0150.00016.75
8.2.170.0060.00922.96
8.2.160.0120.00319.16
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0080.00022.30
8.2.120.0040.00426.35
8.2.110.0070.00419.24
8.2.100.0090.00317.68
8.2.90.0050.00319.22
8.2.80.0040.00417.97
8.2.70.0040.00417.60
8.2.60.0030.00617.93
8.2.50.0000.00918.10
8.2.40.0000.00820.42
8.2.30.0040.00420.65
8.2.20.0040.00417.77
8.2.10.0000.00818.19
8.2.00.0040.00418.14
8.1.280.0120.00625.92
8.1.270.0000.00923.99
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0030.00623.83
8.1.230.0110.00019.05
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0000.00917.35
8.1.190.0040.00417.09
8.1.180.0040.00418.10
8.1.170.0050.00318.59
8.1.160.0050.00220.75
8.1.150.0070.00018.86
8.1.140.0070.00019.48
8.1.130.0000.00717.57
8.1.120.0040.00417.45
8.1.110.0000.00817.39
8.1.100.0000.01017.54
8.1.90.0030.00317.46
8.1.80.0040.00317.46
8.1.70.0000.00717.43
8.1.60.0000.00817.58
8.1.50.0040.00417.48
8.1.40.0000.00817.48
8.1.30.0030.00617.57
8.1.20.0040.00417.66
8.1.10.0040.00417.42
8.1.00.0000.00917.55
8.0.300.0030.00618.77
8.0.290.0020.00516.75
8.0.280.0040.00418.54
8.0.270.0070.00017.32
8.0.260.0060.00317.38
8.0.250.0070.00017.01
8.0.240.0000.00616.89
8.0.230.0050.00216.90
8.0.220.0040.00416.87
8.0.210.0070.00016.98
8.0.200.0070.00017.03
8.0.190.0030.00617.04
8.0.180.0000.00816.98
8.0.170.0000.00816.98
8.0.160.0000.00816.93
8.0.150.0000.00716.90
8.0.140.0040.00416.95
8.0.130.0060.00013.35
8.0.120.0080.00016.92
8.0.110.0030.00516.89
8.0.100.0040.00416.92
8.0.90.0000.00816.93
8.0.80.0130.00316.85
8.0.70.0040.00416.77
8.0.60.0040.00416.98
8.0.50.0050.00216.97
8.0.30.0080.01017.11
8.0.20.0060.01517.40
8.0.10.0080.00017.02
8.0.00.0110.01016.85
7.4.330.0000.00515.08
7.4.320.0040.00416.54
7.4.300.0000.00816.51
7.4.290.0040.00416.52
7.4.280.0030.00516.59
7.4.270.0050.00316.45
7.4.260.0000.00716.50
7.4.250.0040.00416.40
7.4.240.0000.00716.50
7.4.230.0040.00416.63
7.4.220.0070.01016.54
7.4.210.0050.01016.58
7.4.200.0060.00316.52
7.4.160.0080.00816.64
7.4.150.0070.01117.40
7.4.140.0080.01317.86
7.4.130.0060.01016.52
7.4.120.0090.00916.58
7.4.110.0120.00616.44
7.4.100.0140.00416.52
7.4.90.0070.01016.71
7.4.80.0120.00619.39
7.4.70.0110.00616.43
7.4.60.0110.00716.50
7.4.50.0100.00716.48
7.4.40.0190.00316.57
7.4.30.0140.00816.46
7.4.00.0100.00615.09
7.3.330.0030.00313.26
7.3.320.0030.00313.25
7.3.310.0000.00716.38
7.3.300.0030.00316.25
7.3.290.0070.00016.44
7.3.280.0080.00916.37
7.3.270.0030.01517.40
7.3.260.0100.01016.53
7.3.250.0080.01016.38
7.3.240.0130.00616.63
7.3.230.0120.00916.44
7.3.210.0090.00916.56
7.3.200.0130.00316.49
7.3.190.0090.00916.53
7.3.180.0070.01016.47
7.3.170.0110.00616.44
7.3.160.0120.00616.35
7.3.120.0130.00614.85
7.3.110.0090.00914.84
7.3.100.0040.01114.79
7.3.90.0060.00614.97
7.3.80.0060.00914.76
7.3.70.0060.00614.92
7.3.60.0100.01014.63
7.3.50.0030.01414.80
7.3.40.0030.00615.02
7.3.30.0060.00614.93
7.3.20.0090.00616.72
7.3.10.0040.00816.43
7.3.00.0100.00316.87
7.2.330.0130.00416.41
7.2.320.0190.00316.72
7.2.310.0030.01516.57
7.2.300.0080.00816.52
7.2.290.0080.00816.61
7.2.250.0100.00714.99
7.2.240.0000.02115.27
7.2.230.0070.01114.90
7.2.220.0070.00715.25
7.2.210.0070.01014.94
7.2.200.0000.01215.21
7.2.190.0060.01314.96
7.2.180.0030.01615.25
7.2.170.0130.00015.13
7.2.60.0060.00816.76
7.1.330.0070.00716.04
7.1.320.0070.00715.70
7.1.310.0030.01015.99
7.1.300.0040.01115.96
7.1.290.0070.01015.77
7.1.280.0030.00715.52
7.1.270.0030.01015.57
7.1.260.0080.00815.76
7.1.200.0250.00515.75
7.1.70.0040.00416.82
7.1.60.0110.01120.41
7.1.00.0000.08022.27
7.0.200.0700.00416.00
7.0.90.0330.03319.81
7.0.80.0230.03319.86
7.0.70.0370.07319.84
7.0.60.0230.04019.92
7.0.50.0230.03720.29
7.0.40.0000.04320.10
7.0.30.0100.03320.13
7.0.20.0130.03320.00
7.0.10.0030.03720.16
7.0.00.0030.03720.02
5.6.280.0030.07320.91
5.6.230.0100.07320.64
5.6.220.0000.06320.62
5.6.210.0000.04720.70
5.6.200.0070.03721.12
5.6.190.0070.04021.04
5.6.180.0000.04321.11
5.6.170.0070.04021.02
5.6.160.0000.04321.07
5.6.150.0030.03720.94
5.6.140.0000.04321.09
5.6.130.0000.04321.01
5.6.120.0100.03721.09
5.6.110.0030.04320.94
5.6.100.0030.04021.13
5.6.90.0100.03721.03
5.6.80.0070.08020.47
5.6.70.0030.08020.43
5.6.60.0170.05020.46
5.6.50.0130.07020.31
5.6.40.0030.08320.39
5.6.30.0100.06720.47
5.6.20.0070.04020.53
5.6.10.0230.06720.42
5.6.00.0130.03320.41
5.5.370.0000.04320.38
5.5.360.0070.03720.30
5.5.350.0070.03720.42
5.5.340.0030.04020.93
5.5.330.0100.03020.89
5.5.320.0070.04720.84
5.5.310.0030.04320.80
5.5.300.0100.03720.83
5.5.290.0030.06320.78
5.5.280.0100.03320.93
5.5.270.0000.04320.79
5.5.260.0100.04020.86
5.5.250.0100.03320.72
5.5.240.0000.07020.12
5.5.230.0030.08320.29
5.5.220.0100.07020.02
5.5.210.0070.07020.12
5.5.200.0030.04720.29
5.5.190.0100.03720.19
5.5.180.0170.04720.09
5.5.160.0070.06720.09
5.5.150.0230.07020.08
5.5.140.0070.07720.24
5.5.130.0070.06020.13
5.5.120.0070.05320.23
5.5.110.0100.07720.22
5.5.100.0030.05020.02
5.5.90.0100.07019.96
5.5.80.0030.08320.07
5.5.70.0070.06020.11
5.5.60.0170.06320.02
5.5.50.0030.05720.14
5.5.40.0070.04320.16
5.5.30.0100.07720.08
5.5.20.0130.07720.14
5.5.10.0100.05020.04
5.5.00.0030.06320.07

preferences:
62.3 ms | 401 KiB | 5 Q