3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '{ "smartling": { "en_us" : { "files": [ { "fileUri": "/dictionaries/sample_en.json", "stringCount": 100, "wordCount": 12540, "approvedStringCount": 100, "completedStringCount": 40, "lastUploaded": "2014-06-12", "fileType": "json", }, ] }, "ja-jp": { "files":[ { "fileUri": "/dictionaries/sample_jp.json", "stringCount": 100, "wordCount": 12540, "approvedStringCount": 100, "completedStringCount": 40, "lastUploaded": "2014-06-12", "fileType": "json", } ] } } }'; $dict = json_decode($str); $count = count($dict['smartling']); var_dump($dict); echo $count;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5lbIZ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $str, !1 = $dict, !2 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A++++%22smartling%22%3A%0A++++%7B%0A++++++++%22en_us%22+%3A+%7B%0A++++++++++++%22files%22%3A+%5B%0A++++++++++++++++%7B%0A++++++++++++++++++++%22fileUri%22%3A+%22%2Fdictionaries%2Fsample_en.json%22%2C%0A++++++++++++++++++++%22stringCount%22%3A+100%2C%0A++++++++++++++++++++%22wordCount%22%3A+12540%2C%0A++++++++++++++++++++%22approvedStringCount%22%3A+100%2C%0A++++++++++++++++++++%22completedStringCount%22%3A+40%2C%0A++++++++++++++++++++%22lastUploaded%22%3A+%222014-06-12%22%2C%0A++++++++++++++++++++%22fileType%22%3A+%22json%22%2C%0A++++++++++++++++%7D%2C%0A++++++++++++%5D%0A++++++++%7D%2C%0A++++++++%22ja-jp%22%3A+%7B%0A++++++++++++%22files%22%3A%5B%0A++++++++++++++++%7B%0A++++++++++++++++++++%22fileUri%22%3A+%22%2Fdictionaries%2Fsample_jp.json%22%2C%0A++++++++++++++++++++%22stringCount%22%3A+100%2C%0A++++++++++++++++++++%22wordCount%22%3A+12540%2C%0A++++++++++++++++++++%22approvedStringCount%22%3A+100%2C%0A++++++++++++++++++++%22completedStringCount%22%3A+40%2C%0A++++++++++++++++++++%22lastUploaded%22%3A+%222014-06-12%22%2C%0A++++++++++++++++++++%22fileType%22%3A+%22json%22%2C%0A++++++++++++++++%7D%0A++++++++++++%5D%0A++++++++%7D%0A++++%7D%0A%0A%7D'
   36     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   37     5        FETCH_DIM_R                                      ~6      !1, 'smartling'
          6        COUNT                                            ~7      ~6
          7        ASSIGN                                                   !2, ~7
   39     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   41    11        ECHO                                                     !2
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.9 ms | 1395 KiB | 17 Q