3v4l.org

run code in 500+ PHP versions simultaneously
<?php $content = 'foo bar baz <img src="http://ak-hdl.buzzfed.com/static/2014-06/6/12/enhanced/webdr08/enhanced-21313-1402070821-11.jpg" width="500" height="1000"/> dragons and ponies.'; $dom = new \DOMDocument( '1.0' ); $dom->loadHTML( $content ); for ( $i = 0; $i < 1000; $i++ ) { // \DOMNodesList $nodes = $dom->getElementsByTagName( 'img' ); if ( $nodes->length ) { $img = $nodes->item(0); $src = $img->getAttribute( 'src' ); $width = $img->getAttribute( 'width' ); $height = $img->getAttribute( 'height' ); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 10
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 32
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 10
Branch analysis from position: 35
Branch analysis from position: 10
Branch analysis from position: 32
filename:       /in/YHYEa
function name:  (null)
number of ops:  36
compiled vars:  !0 = $content, !1 = $dom, !2 = $i, !3 = $nodes, !4 = $img, !5 = $src, !6 = $width, !7 = $height
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'foo+bar+baz+%3Cimg+src%3D%22http%3A%2F%2Fak-hdl.buzzfed.com%2Fstatic%2F2014-06%2F6%2F12%2Fenhanced%2Fwebdr08%2Fenhanced-21313-1402070821-11.jpg%22+width%3D%22500%22+height%3D%221000%22%2F%3E+dragons+and+ponies.'
    5     1        NEW                                                  $9      'DOMDocument'
          2        SEND_VAL_EX                                                  '1.0'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !1, $9
    6     5        INIT_METHOD_CALL                                             !1, 'loadHTML'
          6        SEND_VAR_EX                                                  !0
          7        DO_FCALL                                          0          
    7     8        ASSIGN                                                       !2, 0
          9      > JMP                                                          ->33
   10    10    >   INIT_METHOD_CALL                                             !1, 'getElementsByTagName'
         11        SEND_VAL_EX                                                  'img'
         12        DO_FCALL                                          0  $14     
         13        ASSIGN                                                       !3, $14
   11    14        FETCH_OBJ_R                                          ~16     !3, 'length'
         15      > JMPZ                                                         ~16, ->32
   13    16    >   INIT_METHOD_CALL                                             !3, 'item'
         17        SEND_VAL_EX                                                  0
         18        DO_FCALL                                          0  $17     
         19        ASSIGN                                                       !4, $17
   14    20        INIT_METHOD_CALL                                             !4, 'getAttribute'
         21        SEND_VAL_EX                                                  'src'
         22        DO_FCALL                                          0  $19     
         23        ASSIGN                                                       !5, $19
   15    24        INIT_METHOD_CALL                                             !4, 'getAttribute'
         25        SEND_VAL_EX                                                  'width'
         26        DO_FCALL                                          0  $21     
         27        ASSIGN                                                       !6, $21
   16    28        INIT_METHOD_CALL                                             !4, 'getAttribute'
         29        SEND_VAL_EX                                                  'height'
         30        DO_FCALL                                          0  $23     
         31        ASSIGN                                                       !7, $23
    7    32    >   PRE_INC                                                      !2
         33    >   IS_SMALLER                                                   !2, 1000
         34      > JMPNZ                                                        ~26, ->10
   18    35    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
184.43 ms | 3290 KiB | 13 Q