3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '{"AAPL":{"quote":{"symbol":"AAPL","companyName":"Apple Inc.","primaryExchange":"Nasdaq Global Select","sector":"Technology","calculationPrice":"close","open":174.87,"openTime":1513780200587,"close":174.35,"closeTime":1513803600484,"high":175.42,"low":173.25,"latestPrice":174.35,"latestSource":"Close","latestTime":"December 20, 2017","latestUpdate":1513803600484,"latestVolume":22242407,"iexRealtimePrice":174.33,"iexRealtimeSize":100,"iexLastUpdated":1513803599803,"delayedPrice":174.28,"delayedPriceTime":1513807168736,"previousClose":174.54,"change":-0.19,"changePercent":-0.00109,"iexMarketPercent":0.02476,"iexVolume":550722,"avgTotalVolume":27497701,"iexBidPrice":0,"iexBidSize":0,"iexAskPrice":0,"iexAskSize":0,"marketCap":895167297200,"peRatio":19.81,"week52High":177.2,"week52Low":114.76,"ytdChange":0.5010761945759792},"earnings":{"symbol":"AAPL","earnings":[{"actualEPS":1.67,"consensusEPS":1.57,"estimatedEPS":1.57,"announceTime":"AMC","numberOfEstimates":13,"EPSSurpriseDollar":0.1,"EPSReportDate":"2017-08-01","fiscalPeriod":"Q3 2017","fiscalEndDate":"2017-06-30"},{"actualEPS":2.1,"consensusEPS":2.02,"estimatedEPS":2.02,"announceTime":"AMC","numberOfEstimates":14,"EPSSurpriseDollar":0.08,"EPSReportDate":"2017-05-02","fiscalPeriod":"Q2 2017","fiscalEndDate":"2017-03-31"},{"actualEPS":3.36,"consensusEPS":3.22,"estimatedEPS":3.22,"announceTime":"AMC","numberOfEstimates":15,"EPSSurpriseDollar":0.14,"EPSReportDate":"2017-01-31","fiscalPeriod":"Q1 2017","fiscalEndDate":"2016-12-31"},{"actualEPS":1.67,"consensusEPS":1.66,"estimatedEPS":1.66,"announceTime":"AMC","numberOfEstimates":14,"EPSSurpriseDollar":0.01,"EPSReportDate":"2016-10-25","fiscalPeriod":"Q4 2016","fiscalEndDate":"2016-09-30"}]},"stats":{"companyName":"Apple Inc.","marketcap":896142816480,"beta":1.201281,"week52high":177.2,"week52low":114.76,"week52change":52.046402,"shortInterest":39370984,"shortDate":"2017-11-30","dividendRate":2.52,"dividendYield":1.4437951,"exDividendDate":"2017-11-10 00:00:00.0","latestEPS":9.21,"latestEPSDate":"2017-09-30","sharesOutstanding":5134312000,"float":5124446610,"returnOnEquity":36.08,"consensusEPS":1.57,"numberOfEstimates":13,"EPSSurpriseDollar":null,"EPSSurprisePercent":6.3694,"symbol":"AAPL","EBITDA":76569000000,"revenue":229234000000,"grossProfit":88186000000,"cash":278493000000,"debt":410090000000,"ttmEPS":8.8,"revenuePerShare":45,"revenuePerEmployee":1863691,"peRatioHigh":114.1,"peRatioLow":0,"returnOnAssets":13.6,"returnOnCapital":null,"profitMargin":19.74,"priceToSales":3.9514005,"priceToBook":6.57,"day200MovingAvg":153.68613,"day50MovingAvg":167.26122,"institutionPercent":35.1,"insiderPercent":null,"shortRatio":1.3429409,"year5ChangePercent":1.3500503437799485,"year2ChangePercent":0.6244293301034194,"year1ChangePercent":0.4947702331961591,"ytdChangePercent":0.5010761945759792,"month6ChangePercent":0.19140358070247362,"month3ChangePercent":0.09840609840609844,"month1ChangePercent":0.025708906930227114,"day5ChangePercent":0.012367901521309926}},"TSLA":{"quote":{"symbol":"TSLA","companyName":"Tesla Inc.","primaryExchange":"Nasdaq Global Select","sector":"Consumer Cyclical","calculationPrice":"close","open":332.69,"openTime":1513780200320,"close":328.98,"closeTime":1513803600302,"high":333.1,"low":325.04,"latestPrice":328.98,"latestSource":"Close","latestTime":"December 20, 2017","latestUpdate":1513803600302,"latestVolume":5951381,"iexRealtimePrice":329.06,"iexRealtimeSize":36,"iexLastUpdated":1513803595501,"delayedPrice":329.17,"delayedPriceTime":1513807018707,"previousClose":331.1,"change":-2.12,"changePercent":-0.0064,"iexMarketPercent":0.02209,"iexVolume":131466,"avgTotalVolume":6218329,"iexBidPrice":0,"iexBidSize":0,"iexAskPrice":0,"iexAskSize":0,"marketCap":55290811607,"peRatio":-37.17,"week52High":389.61,"week52Low":202.5,"ytdChange":0.5258767685146781},"earnings":{"symbol":"TSLA","earnings":[{"actualEPS":-3.59,"consensusEPS":-3.09,"estimatedEPS":-3.09,"announceTime":"AMC","numberOfEstimates":1,"EPSSurpriseDollar":-0.5,"EPSReportDate":"2017-11-01","fiscalPeriod":"Q3 2017","fiscalEndDate":"2017-09-30"},{"actualEPS":-2.04,"consensusEPS":-2,"estimatedEPS":-2,"announceTime":"AMC","numberOfEstimates":2,"EPSSurpriseDollar":-0.04,"EPSReportDate":"2017-08-02","fiscalPeriod":"Q2 2017","fiscalEndDate":"2017-06-30"},{"actualEPS":-1.97,"consensusEPS":-0.67,"estimatedEPS":-0.67,"announceTime":"AMC","numberOfEstimates":1,"EPSSurpriseDollar":-1.3,"EPSReportDate":"2017-05-03","fiscalPeriod":"Q1 2017","fiscalEndDate":"2017-03-31"},{"actualEPS":-1.25,"consensusEPS":-1.19,"estimatedEPS":-1.19,"announceTime":"AMC","numberOfEstimates":2,"EPSSurpriseDollar":-0.06,"EPSReportDate":"2017-02-22","fiscalPeriod":"Q4 2016","fiscalEndDate":"2016-12-31"}]},"stats":{"consensusEPS":-3.09,"numberOfEstimates":1,"EPSSurpriseDollar":null,"EPSSurprisePercent":-16.1812,"symbol":"TSLA","EBITDA":245806000,"revenue":10755133000,"grossProfit":2218979000,"cash":13965763000,"debt":33228331000,"ttmEPS":-8.85,"revenuePerShare":64,"revenuePerEmployee":604833,"returnOnEquity":-37.47,"peRatioHigh":0,"peRatioLow":0,"companyName":"Tesla Inc.","marketcap":55647114485,"beta":0.937545,"week52high":389.61,"week52low":202.5,"week52change":63.3207,"shortInterest":31163330,"shortDate":"2017-11-30","dividendRate":0,"dividendYield":0,"exDividendDate":0,"latestEPS":-4.82,"latestEPSDate":"2016-12-31","sharesOutstanding":168067395,"float":167512239,"returnOnAssets":-6.82,"returnOnCapital":null,"profitMargin":-15.88,"priceToSales":5.2954245,"priceToBook":11.99,"day200MovingAvg":327.17374,"day50MovingAvg":324.7992,"institutionPercent":38.3,"insiderPercent":null,"shortRatio":4.2818084,"year5ChangePercent":8.616613418530353,"year2ChangePercent":0.42371861025111807,"year1ChangePercent":0.6332067281606079,"ytdChangePercent":0.5258767685146781,"month6ChangePercent":-0.10465116279069764,"month3ChangePercent":-0.11730205278592375,"month1ChangePercent":0.07242339832869085,"day5ChangePercent":-0.02339026044892768}},"GE":{"quote":{"symbol":"GE","companyName":"General Electric Company","primaryExchange":"New York Stock Exchange","sector":"Industrials","calculationPrice":"close","open":17.6,"openTime":1513780210723,"close":17.45,"closeTime":1513803610194,"high":17.65,"low":17.36,"latestPrice":17.45,"latestSource":"Close","latestTime":"December 20, 2017","latestUpdate":1513803610194,"latestVolume":75339264,"iexRealtimePrice":17.455,"iexRealtimeSize":100,"iexLastUpdated":1513803595356,"delayedPrice":17.44,"delayedPriceTime":1513807092636,"previousClose":17.59,"change":-0.14,"changePercent":-0.00796,"iexMarketPercent":0.03586,"iexVolume":2701666,"avgTotalVolume":80328402,"iexBidPrice":0,"iexBidSize":0,"iexAskPrice":0,"iexAskSize":0,"marketCap":151327883250,"peRatio":14.07,"week52High":32.38,"week52Low":17.45,"ytdChange":-0.4449353108236037},"earnings":{"symbol":"GE","earnings":[{"actualEPS":0.29,"consensusEPS":0.49,"estimatedEPS":0.49,"announceTime":"BTO","numberOfEstimates":8,"EPSSurpriseDollar":-0.2,"EPSReportDate":"2017-10-20","fiscalPeriod":"Q3 2017","fiscalEndDate":"2017-09-30"},{"actualEPS":0.28,"consensusEPS":0.25,"estimatedEPS":0.25,"announceTime":"BTO","numberOfEstimates":8,"EPSSurpriseDollar":0.03,"EPSReportDate":"2017-07-21","fiscalPeriod":"Q2 2017","fiscalEndDate":"2017-06-30"},{"actualEPS":0.21,"consensusEPS":0.17,"estimatedEPS":0.17,"announceTime":"BTO","numberOfEstimates":8,"EPSSurpriseDollar":0.04,"EPSReportDate":"2017-04-21","fiscalPeriod":"Q1 2017","fiscalEndDate":"2017-03-31"},{"actualEPS":0.46,"consensusEPS":0.46,"estimatedEPS":0.46,"announceTime":"BTO","numberOfEstimates":8,"EPSSurpriseDollar":null,"EPSReportDate":"2017-01-20","fiscalPeriod":"Q4 2016","fiscalEndDate":"2016-12-31"}]},"stats":{"companyName":"General Electric Company","marketcap":152541975150,"beta":1.062203,"week52high":32.38,"week52low":17.46,"week52change":-42.9999,"shortInterest":120704892,"shortDate":"2017-11-30","dividendRate":0.48,"dividendYield":2.7288232,"exDividendDate":"2017-12-26 00:00:00.0","latestEPS":0.89,"latestEPSDate":"2016-12-31","sharesOutstanding":8672085000,"float":8658476659,"returnOnEquity":8.78,"consensusEPS":0.49,"numberOfEstimates":8,"EPSSurpriseDollar":null,"EPSSurprisePercent":-40.8163,"symbol":"GE","EBITDA":16324000000,"revenue":123779000000,"grossProfit":33760000000,"cash":338522000000,"debt":534321000000,"ttmEPS":1.24,"revenuePerShare":14,"revenuePerEmployee":419590,"peRatioHigh":0,"peRatioLow":0,"returnOnAssets":1.81,"returnOnCapital":null,"profitMargin":6.27,"priceToSales":1.2552772,"priceToBook":2.01,"day200MovingAvg":25.09911,"day50MovingAvg":19.8425,"institutionPercent":31.8,"insiderPercent":null,"shortRatio":1.2996557,"year5ChangePercent":-0.16437054631828982,"year2ChangePercent":-0.4213815789473684,"year1ChangePercent":-0.44893483709273185,"ytdChangePercent":-0.4449353108236037,"month6ChangePercent":-0.3892361111111111,"month3ChangePercent":-0.27314049586776856,"month1ChangePercent":-0.021690767519466105,"day5ChangePercent":-0.009572072072072167}}}'; Var_dump(json_decode($str, true));

preferences:
25.23 ms | 402 KiB | 5 Q