3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "<para>From the New York Times</para> <para>Instacart, a two-year-old grocery delivery company, announced a $44 million round of financing on Monday led by Andreessen Horowitz. Three venture capital firms that previously invested in the company, Sequoia Capital, Khosla Ventures and Canaan Partners, participated in the latest round.</para> <para>The company, which is based in San Francisco, lets customers shop online from grocery stores in their area. The orders are filled by other people who have signed up to be shoppers and who receive a cut of the delivery fees. Information about a store’s inventory comes from store managers and from the shoppers. The company says it can have groceries delivered within an hour.</para>"; $dom = new DOMDocument; $dom->preserveWhiteSpace = false; $dom->formatOutput = true; libxml_use_internal_errors(true); $dom->loadHTML($str, LIBXML_HTML_NODEFDTD | LIBXML_HTML_NOIMPLIED); $xpath = new DOMXPath($dom); $secondPara = $xpath->query('//para[2]'); $secondPara->item(0)->setAttribute('align', 'left'); echo $dom->saveHTML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mlItF
function name:  (null)
number of ops:  34
compiled vars:  !0 = $str, !1 = $dom, !2 = $xpath, !3 = $secondPara
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cpara%3EFrom+the+New+York+Times%3C%2Fpara%3E%0A%0A%3Cpara%3EInstacart%2C+a+two-year-old+grocery+delivery+company%2C+announced+a+%2444+million+round+of+financing+on+Monday+led+by+Andreessen+Horowitz.+Three+venture+capital+firms+that+previously+invested+in+the+company%2C+Sequoia+Capital%2C+Khosla+Ventures+and+Canaan+Partners%2C+participated+in+the+latest+round.%3C%2Fpara%3E%0A%0A%3Cpara%3EThe+company%2C+which+is+based+in+San+Francisco%2C+lets+customers+shop+online+from+grocery+stores+in+their+area.+The+orders+are+filled+by+other+people+who+have+signed+up+to+be+shoppers+and+who+receive+a+cut+of+the+delivery+fees.+Information+about+a+store%E2%80%99s+inventory+comes+from+store+managers+and+from+the+shoppers.+The+company+says+it+can+have+groceries+delivered+within+an+hour.%3C%2Fpara%3E'
    9     1        NEW                                              $5      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $5
   10     4        ASSIGN_OBJ                                               !1, 'preserveWhiteSpace'
          5        OP_DATA                                                  <false>
   11     6        ASSIGN_OBJ                                               !1, 'formatOutput'
          7        OP_DATA                                                  <true>
   13     8        INIT_FCALL                                               'libxml_use_internal_errors'
          9        SEND_VAL                                                 <true>
         10        DO_ICALL                                                 
   14    11        INIT_METHOD_CALL                                         !1, 'loadHTML'
         12        SEND_VAR_EX                                              !0
         13        SEND_VAL_EX                                              8196
         14        DO_FCALL                                      0          
   16    15        NEW                                              $12     'DOMXPath'
         16        SEND_VAR_EX                                              !1
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !2, $12
   17    19        INIT_METHOD_CALL                                         !2, 'query'
         20        SEND_VAL_EX                                              '%2F%2Fpara%5B2%5D'
         21        DO_FCALL                                      0  $15     
         22        ASSIGN                                                   !3, $15
   18    23        INIT_METHOD_CALL                                         !3, 'item'
         24        SEND_VAL_EX                                              0
         25        DO_FCALL                                      0  $17     
         26        INIT_METHOD_CALL                                         $17, 'setAttribute'
         27        SEND_VAL_EX                                              'align'
         28        SEND_VAL_EX                                              'left'
         29        DO_FCALL                                      0          
   20    30        INIT_METHOD_CALL                                         !1, 'saveHTML'
         31        DO_FCALL                                      0  $19     
         32        ECHO                                                     $19
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.55 ms | 1388 KiB | 15 Q