3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(!interface_exists('gmTrackerInterface')) { //require_once(dirname(__FILE__) . '/gmTrackerInterface.php'); } /** * Cookie approval tracking filter * * @package gm_Tracking * @author Pierre GERRIER <pierre@gerrier.fr> * @copyright © 2014 Le Groupe Moniteur */ class CookieApprovalTracking implements gmTrackerInterface { static protected $active = true; static public function get_tracking_code() { $out = ''; if(static::$active && !isset($_COOKIE[COOKIE_APPROVAL_NAME])) { $out = '<div id="bandeauCookies" class="bot" data-dom="' . COOKIE_APPROVAL_DOMAIN . '" data-name="' . COOKIE_APPROVAL_NAME . '"> <div>En poursuivant votre navigation sur ce site, vous acceptez l\'utilisation de cookies pour vous proposer des services et offres adapt&eacute;s &agrave; vos centres d\'int&eacute;r&ecirc;t. <a href="#" class="btOk">OK</a> <span class="plus"> <a href="http://www.infopro-digital.com/cookies/" target="_blank"><span class="fleche"></span>En savoir plus</a> <a href="#" class="fermer" title="Fermer">X</a> </span> </div> </div>'; } return $out; } static public function get_admin_bar_label() { return 'Cookie approval ' . (static::$active ? 'Activé' : 'Désactivé'); } static public function get_admin_bar_content() { return false; } } /** * Base interface for user-tracking filters * * @package gm_Tracking * @author Pierre GERRIER <pierre@gerrier.fr> * @copyright © 2013 Le Groupe Moniteur */ interface gmTrackerInterface { /** * Computes the tracking code * * You should override this method when you add * a new tracking filter. * * @return string The tracking markup to be inserted */ static public function get_tracking_code(); /** * Provides the label displayed in the admin bar menu * @return string */ static public function get_admin_bar_label(); /** * Provides the content displayed in the admin bar menu * @return false|string */ static public function get_admin_bar_content(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/o75lN
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'interface_exists'
          1        SEND_VAL                                                 'gmTrackerInterface'
          2        DO_ICALL                                         $0      
          3        BOOL_NOT                                         ~1      $0
          4      > JMPZ                                                     ~1, ->5
   14     5    >   DECLARE_CLASS                                            'cookieapprovaltracking'
   76     6      > RETURN                                                   1

Class CookieApprovalTracking:
Function get_tracking_code:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 8
filename:       /in/o75lN
function name:  get_tracking_code
number of ops:  18
compiled vars:  !0 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN                                                   !0, ''
   21     1        FETCH_STATIC_PROP_R          unknown             ~2      'active'
          2      > JMPZ_EX                                          ~2      ~2, ->8
          3    >   FETCH_CONSTANT                                   ~4      'COOKIE_APPROVAL_NAME'
          4        FETCH_IS                                         ~3      '_COOKIE'
          5        ISSET_ISEMPTY_DIM_OBJ                         0  ~5      ~3, ~4
          6        BOOL_NOT                                         ~6      ~5
          7        BOOL                                             ~2      ~6
          8    > > JMPZ                                                     ~2, ->16
   22     9    >   FETCH_CONSTANT                                   ~7      'COOKIE_APPROVAL_DOMAIN'
         10        CONCAT                                           ~8      '%3Cdiv+id%3D%22bandeauCookies%22+class%3D%22bot%22+data-dom%3D%22', ~7
         11        CONCAT                                           ~9      ~8, '%22+data-name%3D%22'
         12        FETCH_CONSTANT                                   ~10     'COOKIE_APPROVAL_NAME'
         13        CONCAT                                           ~11     ~9, ~10
         14        CONCAT                                           ~12     ~11, '%22%3E%0A%09%09%09%09%09%3Cdiv%3EEn+poursuivant+votre+navigation+sur+ce+site%2C+vous+acceptez+l%27utilisation+de+cookies+pour+vous+proposer+des+services+et+offres+adapt%26eacute%3Bs+%26agrave%3B+vos+centres+d%27int%26eacute%3Br%26ecirc%3Bt.%0A%09%09%09%09%09%09%3Ca+href%3D%22%23%22+class%3D%22btOk%22%3EOK%3C%2Fa%3E%0A%09%09%09%09%09%09%3Cspan+class%3D%22plus%22%3E%0A%09%09%09%09%09%09%09%3Ca+href%3D%22http%3A%2F%2Fwww.infopro-digital.com%2Fcookies%2F%22+target%3D%22_blank%22%3E%3Cspan+class%3D%22fleche%22%3E%3C%2Fspan%3EEn+savoir+plus%3C%2Fa%3E%0A%09%09%09%09%09%09%09%3Ca+href%3D%22%23%22+class%3D%22fermer%22+title%3D%22Fermer%22%3EX%3C%2Fa%3E%0A%09%09%09%09%09%09%3C%2Fspan%3E%0A%09%09%09%09%09%3C%2Fdiv%3E%0A%09%09%09%09%3C%2Fdiv%3E'
         15        ASSIGN                                                   !0, ~12
   33    16    > > RETURN                                                   !0
   34    17*     > RETURN                                                   null

End of function get_tracking_code

Function get_admin_bar_label:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o75lN
function name:  get_admin_bar_label
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'active'
          1      > JMPZ                                                     ~0, ->4
          2    >   QM_ASSIGN                                        ~1      'Activ%C3%A9'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~1      'D%C3%A9sactiv%C3%A9'
          5    >   CONCAT                                           ~2      'Cookie+approval+', ~1
          6      > RETURN                                                   ~2
   38     7*     > RETURN                                                   null

End of function get_admin_bar_label

Function get_admin_bar_content:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o75lN
function name:  get_admin_bar_content
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E > > RETURN                                                   <false>
   42     1*     > RETURN                                                   null

End of function get_admin_bar_content

End of class CookieApprovalTracking.

Class gmTrackerInterface:
Function get_tracking_code:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o75lN
function name:  get_tracking_code
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   63     0  E > > RETURN                                                   null

End of function get_tracking_code

Function get_admin_bar_label:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o75lN
function name:  get_admin_bar_label
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   69     0  E > > RETURN                                                   null

End of function get_admin_bar_label

Function get_admin_bar_content:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o75lN
function name:  get_admin_bar_content
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   75     0  E > > RETURN                                                   null

End of function get_admin_bar_content

End of class gmTrackerInterface.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.07 ms | 1400 KiB | 15 Q