3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace foo; define('LG', 'fr'); $sql = " SELECT id, titre FROM contenu_trad WHERE lg = '".LG."' "; var_dump($sql); class Url { private $sql = " SELECT id, titre FROM contenu_trad WHERE lg = '".LG."' "; public function getSQL() { return $this->sql; } } $url = new Url; var_dump($url->getSQL());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nWWvf
function name:  (null)
number of ops:  20
compiled vars:  !0 = $sql, !1 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_NS_FCALL_BY_NAME                                    'foo%5Cdefine'
          1        SEND_VAL_EX                                              'LG'
          2        SEND_VAL_EX                                              'fr'
          3        DO_FCALL                                      0          
    6     4        FETCH_CONSTANT                                   ~3      'foo%5CLG'
          5        CONCAT                                           ~4      '+SELECT+id%2C+titre+FROM+contenu_trad+WHERE+lg+%3D+%27', ~3
          6        CONCAT                                           ~5      ~4, '%27+'
          7        ASSIGN                                                   !0, ~5
    7     8        INIT_NS_FCALL_BY_NAME                                    'foo%5Cvar_dump'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
   16    11        NEW                                              $8      'foo%5CUrl'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !1, $8
   17    14        INIT_NS_FCALL_BY_NAME                                    'foo%5Cvar_dump'
         15        INIT_METHOD_CALL                                         !1, 'getSQL'
         16        DO_FCALL                                      0  $11     
         17        SEND_VAR_NO_REF_EX                                       $11
         18        DO_FCALL                                      0          
         19      > RETURN                                                   1

Class foo\Url:
Function getsql:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nWWvf
function name:  getSQL
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_OBJ_R                                      ~0      'sql'
          1      > RETURN                                                   ~0
   13     2*     > RETURN                                                   null

End of function getsql

End of class foo\Url.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.81 ms | 1395 KiB | 17 Q