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("http://download.finance.yahoo.com/d/quotes.csv?s=CIEL3.SA&f=sl1xp2c1hgmvc4d1t1", "r"); //$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.86
8.3.50.0000.01616.74
8.3.40.0040.01119.40
8.3.30.0050.01019.01
8.3.20.0030.00520.59
8.3.10.0000.00821.89
8.3.00.0030.00521.18
8.2.180.0100.00617.25
8.2.170.0040.01122.96
8.2.160.0110.00419.27
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0000.00822.49
8.2.120.0060.00326.35
8.2.110.0100.00019.35
8.2.100.0000.01218.17
8.2.90.0040.00419.38
8.2.80.0030.00617.97
8.2.70.0000.00817.88
8.2.60.0030.00618.02
8.2.50.0120.00318.10
8.2.40.0030.00520.71
8.2.30.0000.00820.82
8.2.20.0040.00418.13
8.2.10.0000.00718.38
8.2.00.0030.00618.33
8.1.280.0070.01125.92
8.1.270.0040.00424.27
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0000.00922.92
8.1.230.0090.00317.64
8.1.220.0080.00017.74
8.1.210.0050.00518.77
8.1.200.0090.00017.48
8.1.190.0030.00517.48
8.1.180.0000.00818.10
8.1.170.0000.00818.84
8.1.160.0040.00421.11
8.1.150.0050.00319.00
8.1.140.0040.00419.82
8.1.130.0000.00717.82
8.1.120.0080.00017.63
8.1.110.0050.00317.63
8.1.100.0030.00617.50
8.1.90.0000.00717.59
8.1.80.0070.00017.48
8.1.70.0000.00717.57
8.1.60.0030.00617.84
8.1.50.0050.00317.67
8.1.40.0000.00817.65
8.1.30.0040.00417.75
8.1.20.0040.00417.79
8.1.10.0050.00317.60
8.1.00.0080.00017.54
8.0.300.0030.00518.77
8.0.290.0040.00416.88
8.0.280.0040.00418.65
8.0.270.0000.00817.54
8.0.260.0040.00417.51
8.0.250.0030.00317.17
8.0.240.0040.00417.24
8.0.230.0080.00017.21
8.0.220.0040.00417.25
8.0.210.0040.00417.15
8.0.200.0000.00717.19
8.0.190.0050.00317.34
8.0.180.0000.00817.11
8.0.170.0000.00817.22
8.0.160.0060.00317.24
8.0.150.0070.00017.00
8.0.140.0040.00417.07
8.0.130.0000.00613.66
8.0.120.0050.00317.30
8.0.110.0080.00017.33
8.0.100.0030.00517.13
8.0.90.0050.00317.08
8.0.80.0060.01117.25
8.0.70.0000.00817.14
8.0.60.0060.00317.24
8.0.50.0080.00017.14
8.0.30.0090.01217.48
8.0.20.0110.01117.47
8.0.10.0030.00517.37
8.0.00.0100.01017.08
7.4.330.0030.00315.08
7.4.320.0000.00816.61
7.4.300.0000.00816.60
7.4.290.0040.00416.61
7.4.280.0100.00316.73
7.4.270.0000.01116.61
7.4.260.0000.00716.63
7.4.250.0030.00616.60
7.4.240.0090.00016.59
7.4.230.0050.00516.78
7.4.220.0100.01716.62
7.4.210.0130.00916.64
7.4.200.0030.00616.80
7.4.160.0380.01616.57
7.4.150.0430.01117.40
7.4.140.0360.02217.86
7.4.130.0140.01616.73
7.4.120.0150.01416.67
7.4.110.0410.00816.76
7.4.100.0140.00916.72
7.4.90.0120.02016.69
7.4.80.0290.00719.39
7.4.70.0120.01116.67
7.4.60.0110.01116.54
7.4.50.0100.00716.73
7.4.40.0470.00616.76
7.4.30.0270.01216.66
7.4.00.0070.01115.11
7.3.330.0000.00713.50
7.3.320.0030.00313.48
7.3.310.0060.00316.59
7.3.300.0050.00516.54
7.3.290.0030.00316.64
7.3.280.0130.00916.63
7.3.270.0150.00917.40
7.3.260.0410.01516.49
7.3.250.0250.01716.64
7.3.240.0310.01516.69
7.3.230.0370.01516.63
7.3.210.0480.02016.41
7.3.200.0810.04116.71
7.3.190.0640.02416.61
7.3.180.0140.00916.62
7.3.170.0890.03516.72
7.3.160.0190.02816.57
7.2.330.0410.01316.59
7.2.320.0760.01316.61
7.2.310.0480.01916.98
7.2.300.0550.00817.02
7.2.290.0760.01416.82
7.2.60.0030.01016.72
7.1.200.0150.00016.27
7.1.100.0070.01118.70
7.1.70.0040.00417.46
7.1.60.0090.01220.41
7.1.50.0160.00617.34
7.1.00.0030.07722.77
7.0.200.0400.00716.00
7.0.90.0700.07320.35
7.0.80.0600.04020.11
7.0.70.0430.05020.24
7.0.60.0530.07020.39
7.0.50.0370.08320.52
7.0.40.0170.07020.43
7.0.30.0100.07320.44
7.0.20.0070.06020.30
7.0.10.0030.04320.54
7.0.00.0030.05020.42
5.6.240.0070.08020.95
5.6.230.0030.08720.96
5.6.220.0100.06020.90
5.6.210.0070.04320.85
5.6.200.0130.08321.52
5.6.190.0070.08021.46
5.6.180.0130.04721.43
5.6.170.0070.05321.49
5.6.160.0130.07721.50
5.6.150.0030.08321.32
5.6.140.0000.09321.53
5.6.130.0100.08321.32
5.6.120.0130.06721.39
5.6.110.0000.09721.23
5.6.100.0100.05021.35
5.6.90.0030.04721.43
5.6.80.0170.07020.75
5.6.70.0030.06320.84
5.6.60.0070.07720.76
5.6.50.0030.06320.88
5.6.40.0100.07720.57
5.6.30.0170.04320.80
5.6.20.0100.08320.79
5.6.10.0070.07020.87
5.6.00.0030.05320.71
5.5.380.0070.08320.71
5.5.370.0070.05020.62
5.5.360.0030.06720.70
5.5.350.0100.07720.78
5.5.340.0070.05021.34
5.5.330.0070.08321.25
5.5.320.0100.07321.05
5.5.310.0130.04321.20
5.5.300.0170.07020.98
5.5.290.0030.09321.29
5.5.280.0100.05321.25
5.5.270.0100.04321.00
5.5.260.0070.09021.02
5.5.250.0030.08721.10
5.5.240.0130.07320.70
5.5.230.0030.04720.64
5.5.220.0230.03720.57
5.5.210.0030.08020.48
5.5.200.0130.07020.56
5.5.190.0070.06320.38
5.5.180.0100.04320.41
5.5.160.0070.08020.70
5.5.150.0100.05720.57
5.5.140.0070.07720.38
5.5.130.0170.07320.61
5.5.120.0070.08320.46
5.5.110.0130.04020.55
5.5.100.0070.05720.37
5.5.90.0130.07320.46
5.5.80.0200.06720.55
5.5.70.0100.05320.45
5.5.60.0100.04720.41
5.5.50.0030.05720.49
5.5.40.0070.04720.33
5.5.30.0270.04720.51
5.5.20.0030.04320.54
5.5.10.0070.08020.35
5.5.00.0100.07720.49

preferences:
70.88 ms | 401 KiB | 5 Q