3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '[[{"u":"ali","user_date":"2011-01-19","up":"superthumb"},{"u":"Lucky","user_date":"2011-01-19","up":"superthumb"},{"u":"Lucky","user_date":"2011-01-19","up":"superthumb"},{"u":"aq","user_date":"2011-01-19","up":"cute_glassess_girl"},{"u":"aq","user_date":"2011-01-19","up":"cute_glassess_girl"},{"u":"aq","user_date":"2011-01-19","up":"cute_glassess_girl"},{"u":"aq","user_date":"2011-01-19","up":"cute_glassess_girl"}],[{"comment_id":"7","comment_text":"kHi there i am your great fan","commenter_id":"46","commented_post_fk_id":"2","comment_date":"2011-01-19","deleted":"0"},{"comment_id":"8","comment_text":"kHi there i am your great fan","commenter_id":"47","commented_post_fk_id":"2","comment_date":"2011-01-19","deleted":"0"},{"comment_id":"9","comment_text":"lucky0473649","commenter_id":"48","commented_post_fk_id":"2","comment_date":"2011-01-19","deleted":"0"},{"comment_id":"10","comment_text":"lucky0473649","commenter_id":"49","commented_post_fk_id":"2","comment_date":"2011-01-19","deleted":"0"},{"comment_id":"11","comment_text":"lucky0473649","commenter_id":"50","commented_post_fk_id":"2","comment_date":"2011-01-19","deleted":"0"},{"comment_id":"12","comment_text":"lucky0473649","commenter_id":"51","commented_post_fk_id":"2","comment_date":"2011-01-19","deleted":"0"},{"comment_id":"17","comment_text":"ali","commenter_id":"28","commented_post_fk_id":"2","comment_date":"2011-01-19","deleted":"0"},{"comment_id":"18","comment_text":"ali","commenter_id":"28","commented_post_fk_id":"2","comment_date":"2011-01-19","deleted":"0"}]]'; $array = json_decode($json, true); // var_export($array); foreach ($array[1] as $comment) { echo $comment["comment_text"] , "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/4lYOX
function name:  (null)
number of ops:  15
compiled vars:  !0 = $json, !1 = $array, !2 = $comment
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%5B%5B%7B%22u%22%3A%22ali%22%2C%22user_date%22%3A%222011-01-19%22%2C%22up%22%3A%22superthumb%22%7D%2C%7B%22u%22%3A%22Lucky%22%2C%22user_date%22%3A%222011-01-19%22%2C%22up%22%3A%22superthumb%22%7D%2C%7B%22u%22%3A%22Lucky%22%2C%22user_date%22%3A%222011-01-19%22%2C%22up%22%3A%22superthumb%22%7D%2C%7B%22u%22%3A%22aq%22%2C%22user_date%22%3A%222011-01-19%22%2C%22up%22%3A%22cute_glassess_girl%22%7D%2C%7B%22u%22%3A%22aq%22%2C%22user_date%22%3A%222011-01-19%22%2C%22up%22%3A%22cute_glassess_girl%22%7D%2C%7B%22u%22%3A%22aq%22%2C%22user_date%22%3A%222011-01-19%22%2C%22up%22%3A%22cute_glassess_girl%22%7D%2C%7B%22u%22%3A%22aq%22%2C%22user_date%22%3A%222011-01-19%22%2C%22up%22%3A%22cute_glassess_girl%22%7D%5D%2C%5B%7B%22comment_id%22%3A%227%22%2C%22comment_text%22%3A%22kHi+there+i+am+your+great+fan%22%2C%22commenter_id%22%3A%2246%22%2C%22commented_post_fk_id%22%3A%222%22%2C%22comment_date%22%3A%222011-01-19%22%2C%22deleted%22%3A%220%22%7D%2C%7B%22comment_id%22%3A%228%22%2C%22comment_text%22%3A%22kHi+there+i+am+your+great+fan%22%2C%22commenter_id%22%3A%2247%22%2C%22commented_post_fk_id%22%3A%222%22%2C%22comment_date%22%3A%222011-01-19%22%2C%22deleted%22%3A%220%22%7D%2C%7B%22comment_id%22%3A%229%22%2C%22comment_text%22%3A%22lucky0473649%22%2C%22commenter_id%22%3A%2248%22%2C%22commented_post_fk_id%22%3A%222%22%2C%22comment_date%22%3A%222011-01-19%22%2C%22deleted%22%3A%220%22%7D%2C%7B%22comment_id%22%3A%2210%22%2C%22comment_text%22%3A%22lucky0473649%22%2C%22commenter_id%22%3A%2249%22%2C%22commented_post_fk_id%22%3A%222%22%2C%22comment_date%22%3A%222011-01-19%22%2C%22deleted%22%3A%220%22%7D%2C%7B%22comment_id%22%3A%2211%22%2C%22comment_text%22%3A%22lucky0473649%22%2C%22commenter_id%22%3A%2250%22%2C%22commented_post_fk_id%22%3A%222%22%2C%22comment_date%22%3A%222011-01-19%22%2C%22deleted%22%3A%220%22%7D%2C%7B%22comment_id%22%3A%2212%22%2C%22comment_text%22%3A%22lucky0473649%22%2C%22commenter_id%22%3A%2251%22%2C%22commented_post_fk_id%22%3A%222%22%2C%22comment_date%22%3A%222011-01-19%22%2C%22deleted%22%3A%220%22%7D%2C%7B%22comment_id%22%3A%2217%22%2C%22comment_text%22%3A%22ali%22%2C%22commenter_id%22%3A%2228%22%2C%22commented_post_fk_id%22%3A%222%22%2C%22comment_date%22%3A%222011-01-19%22%2C%22deleted%22%3A%220%22%7D%2C%7B%22comment_id%22%3A%2218%22%2C%22comment_text%22%3A%22ali%22%2C%22commenter_id%22%3A%2228%22%2C%22commented_post_fk_id%22%3A%222%22%2C%22comment_date%22%3A%222011-01-19%22%2C%22deleted%22%3A%220%22%7D%5D%5D'
    4     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    7     6        FETCH_DIM_R                                      ~6      !1, 1
          7      > FE_RESET_R                                       $7      ~6, ->13
          8    > > FE_FETCH_R                                               $7, !2, ->13
    8     9    >   FETCH_DIM_R                                      ~8      !2, 'comment_text'
         10        ECHO                                                     ~8
         11        ECHO                                                     '%0A'
    7    12      > JMP                                                      ->8
         13    >   FE_FREE                                                  $7
    9    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.75 ms | 1003 KiB | 14 Q