3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml='<?xml version="1.0" encoding="UTF-8" ?>'; $xml.='<Test> <Item> <Price>0.53</Price> </Item> </Test>'; $result=simplexml_load_string($xml); var_dump($result->Item->Price); echo '<br>'; echo $result->Item->Price; echo '<br>'; echo 1+$result->Item->Price; echo '<br>'; echo 1+(float)$result->Item->Price;
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/SMgpW
function name:  (null)
number of ops:  27
compiled vars:  !0 = $xml, !1 = $result
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UTF-8%22+%3F%3E'
   7     1        ASSIGN_CONCAT                                 0          !0, '%3CTest%3E%0A++%3CItem%3E%0A++++%3CPrice%3E0.53%3C%2FPrice%3E%0A++%3C%2FItem%3E%0A%3C%2FTest%3E'
   9     2        INIT_FCALL                                               'simplexml_load_string'
         3        SEND_VAR                                                 !0
         4        DO_ICALL                                         $4      
         5        ASSIGN                                                   !1, $4
  11     6        INIT_FCALL                                               'var_dump'
         7        FETCH_OBJ_R                                      $6      !1, 'Item'
         8        FETCH_OBJ_R                                      $7      $6, 'Price'
         9        SEND_VAR                                                 $7
        10        DO_ICALL                                                 
  12    11        ECHO                                                     '%3Cbr%3E'
  13    12        FETCH_OBJ_R                                      $9      !1, 'Item'
        13        FETCH_OBJ_R                                      $10     $9, 'Price'
        14        ECHO                                                     $10
  14    15        ECHO                                                     '%3Cbr%3E'
  15    16        FETCH_OBJ_R                                      $11     !1, 'Item'
        17        FETCH_OBJ_R                                      $12     $11, 'Price'
        18        ADD                                              ~13     1, $12
        19        ECHO                                                     ~13
  16    20        ECHO                                                     '%3Cbr%3E'
  17    21        FETCH_OBJ_R                                      $14     !1, 'Item'
        22        FETCH_OBJ_R                                      $15     $14, 'Price'
        23        CAST                                          5  ~16     $15
        24        ADD                                              ~17     1, ~16
        25        ECHO                                                     ~17
        26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0