3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{ "@attributes": { "count": "1" }, "receipt": { "@attributes": { "currency": "USD", "rotation": "RT_Clockwise" }, "vendor": { "@attributes": { "confidence": "0.000", "isSuspicious": "true" }, "name": { "recognizedValue": { "text": "SEATTLE" } }, "fullAddress": { "text": {} }, "address": { "text": {} }, "phone": { "@attributes": { "confidence": "70", "isSuspicious": "true" }, "normalizedValue": "2066219777", "recognizedValue": { "text": "206\n621\n9777" } }, "purchaseType": "GasolineStation", "city": { "normalizedValue": "Seattle", "recognizedValue": { "text": "SEATTLE" } }, "zip": { "@attributes": { "confidence": "99", "isSuspicious": "false" }, "normalizedValue": "98134", "recognizedValue": { "text": "98134" } }, "administrativeRegion": { "normalizedValue": "WA", "recognizedValue": { "text": "WA" } } }, "date": { "@attributes": { "confidence": "100", "isSuspicious": "false" }, "normalizedValue": "2020-04-02", "recognizedValue": { "text": "04/02/20" } }, "time": { "@attributes": { "confidence": "100", "isSuspicious": "false" }, "normalizedValue": "14:17:49", "recognizedValue": { "text": "14:17:49" } }, "total": { "@attributes": { "confidence": "34", "isSuspicious": "true" }, "normalizedValue": "150.00", "recognizedValue": { "text": "150\n00" } }, "tax": { "@attributes": { "total": "false" }, "normalizedValue": "0.00", "recognizedValue": { "text": "0.00" } }, "payment": { "@attributes": { "type": "Card", "cardType": "AmericanExpress" }, "value": { "normalizedValue": "150.00", "recognizedValue": { "text": "150\n00" } }, "cardNumber": { "normalizedValue": "XXXXXXXXXXXX2467", "recognizedValue": { "text": "X2467" } } }, "recognizedItems": { "@attributes": { "count": "1" }, "item": { "@attributes": { "index": "1" }, "name": { "@attributes": { "confidence": "0", "isSuspicious": "true" }, "text": "Prepay CA#11" }, "count": { "@attributes": { "confidence": "19", "isSuspicious": "true" }, "normalizedValue": "1.000" }, "total": { "@attributes": { "confidence": "85", "isSuspicious": "false" }, "normalizedValue": "150.00", "recognizedValue": { "text": "150.00" } }, "recognizedText": {}, "amountUnits": "unit" } }, "country": { "@attributes": { "confidence": "100", "isSuspicious": "false" }, "normalizedValue": "USA" }, "recognizedText": {} } }'; $value = json_decode($json)->receipt->total->normalizedValue; var_dump($value);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2I0hf
function name:  (null)
number of ops:  12
compiled vars:  !0 = $json, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22count%22%3A+%221%22%0A++++%7D%2C%0A++++%22receipt%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22currency%22%3A+%22USD%22%2C%0A++++%22rotation%22%3A+%22RT_Clockwise%22%0A++++%7D%2C%0A++++%22vendor%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22confidence%22%3A+%220.000%22%2C%0A++++%22isSuspicious%22%3A+%22true%22%0A++++%7D%2C%0A++++%22name%22%3A+%7B%0A++++%22recognizedValue%22%3A+%7B%0A++++%22text%22%3A+%22SEATTLE%22%0A++++%7D%0A++++%7D%2C%0A++++%22fullAddress%22%3A+%7B%0A++++%22text%22%3A+%7B%7D%0A++++%7D%2C%0A++++%22address%22%3A+%7B%0A++++%22text%22%3A+%7B%7D%0A++++%7D%2C%0A++++%22phone%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22confidence%22%3A+%2270%22%2C%0A++++%22isSuspicious%22%3A+%22true%22%0A++++%7D%2C%0A++++%22normalizedValue%22%3A+%222066219777%22%2C%0A++++%22recognizedValue%22%3A+%7B%0A++++%22text%22%3A+%22206%5Cn621%5Cn9777%22%0A++++%7D%0A++++%7D%2C%0A++++%22purchaseType%22%3A+%22GasolineStation%22%2C%0A++++%22city%22%3A+%7B%0A++++%22normalizedValue%22%3A+%22Seattle%22%2C%0A++++%22recognizedValue%22%3A+%7B%0A++++%22text%22%3A+%22SEATTLE%22%0A++++%7D%0A++++%7D%2C%0A++++%22zip%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22confidence%22%3A+%2299%22%2C%0A++++%22isSuspicious%22%3A+%22false%22%0A++++%7D%2C%0A++++%22normalizedValue%22%3A+%2298134%22%2C%0A++++%22recognizedValue%22%3A+%7B%0A++++%22text%22%3A+%2298134%22%0A++++%7D%0A++++%7D%2C%0A++++%22administrativeRegion%22%3A+%7B%0A++++%22normalizedValue%22%3A+%22WA%22%2C%0A++++%22recognizedValue%22%3A+%7B%0A++++%22text%22%3A+%22WA%22%0A++++%7D%0A++++%7D%0A++++%7D%2C%0A++++%22date%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22confidence%22%3A+%22100%22%2C%0A++++%22isSuspicious%22%3A+%22false%22%0A++++%7D%2C%0A++++%22normalizedValue%22%3A+%222020-04-02%22%2C%0A++++%22recognizedValue%22%3A+%7B%0A++++%22text%22%3A+%2204%2F02%2F20%22%0A++++%7D%0A++++%7D%2C%0A++++%22time%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22confidence%22%3A+%22100%22%2C%0A++++%22isSuspicious%22%3A+%22false%22%0A++++%7D%2C%0A++++%22normalizedValue%22%3A+%2214%3A17%3A49%22%2C%0A++++%22recognizedValue%22%3A+%7B%0A++++%22text%22%3A+%2214%3A17%3A49%22%0A++++%7D%0A++++%7D%2C%0A++++%22total%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22confidence%22%3A+%2234%22%2C%0A++++%22isSuspicious%22%3A+%22true%22%0A++++%7D%2C%0A++++%22normalizedValue%22%3A+%22150.00%22%2C%0A++++%22recognizedValue%22%3A+%7B%0A++++%22text%22%3A+%22150%5Cn00%22%0A++++%7D%0A++++%7D%2C%0A++++%22tax%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22total%22%3A+%22false%22%0A++++%7D%2C%0A++++%22normalizedValue%22%3A+%220.00%22%2C%0A++++%22recognizedValue%22%3A+%7B%0A++++%22text%22%3A+%220.00%22%0A++++%7D%0A++++%7D%2C%0A++++%22payment%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22type%22%3A+%22Card%22%2C%0A++++%22cardType%22%3A+%22AmericanExpress%22%0A++++%7D%2C%0A++++%22value%22%3A+%7B%0A++++%22normalizedValue%22%3A+%22150.00%22%2C%0A++++%22recognizedValue%22%3A+%7B%0A++++%22text%22%3A+%22150%5Cn00%22%0A++++%7D%0A++++%7D%2C%0A++++%22cardNumber%22%3A+%7B%0A++++%22normalizedValue%22%3A+%22XXXXXXXXXXXX2467%22%2C%0A++++%22recognizedValue%22%3A+%7B%0A++++%22text%22%3A+%22X2467%22%0A++++%7D%0A++++%7D%0A++++%7D%2C%0A++++%22recognizedItems%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22count%22%3A+%221%22%0A++++%7D%2C%0A++++%22item%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22index%22%3A+%221%22%0A++++%7D%2C%0A++++%22name%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22confidence%22%3A+%220%22%2C%0A++++%22isSuspicious%22%3A+%22true%22%0A++++%7D%2C%0A++++%22text%22%3A+%22Prepay+CA%2311%22%0A++++%7D%2C%0A++++%22count%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22confidence%22%3A+%2219%22%2C%0A++++%22isSuspicious%22%3A+%22true%22%0A++++%7D%2C%0A++++%22normalizedValue%22%3A+%221.000%22%0A++++%7D%2C%0A++++%22total%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22confidence%22%3A+%2285%22%2C%0A++++%22isSuspicious%22%3A+%22false%22%0A++++%7D%2C%0A++++%22normalizedValue%22%3A+%22150.00%22%2C%0A++++%22recognizedValue%22%3A+%7B%0A++++%22text%22%3A+%22150.00%22%0A++++%7D%0A++++%7D%2C%0A++++%22recognizedText%22%3A+%7B%7D%2C%0A++++%22amountUnits%22%3A+%22unit%22%0A++++%7D%0A++++%7D%2C%0A++++%22country%22%3A+%7B%0A++++%22%40attributes%22%3A+%7B%0A++++%22confidence%22%3A+%22100%22%2C%0A++++%22isSuspicious%22%3A+%22false%22%0A++++%7D%2C%0A++++%22normalizedValue%22%3A+%22USA%22%0A++++%7D%2C%0A++++%22recognizedText%22%3A+%7B%7D%0A++++%7D%0A++++%7D'
  166     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        FETCH_OBJ_R                                      ~4      $3, 'receipt'
          5        FETCH_OBJ_R                                      ~5      ~4, 'total'
          6        FETCH_OBJ_R                                      ~6      ~5, 'normalizedValue'
          7        ASSIGN                                                   !1, ~6
  167     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.23 ms | 1016 KiB | 15 Q