3v4l.org

run code in 300+ PHP versions simultaneously
<?php //////////////////////////////////////////////// // // File: abstract.WorkUnitDataType.php // //////////////////////////////////////////////// // Author: Adam Profitt // // Comments: // Work unit enumeration sim class // //////////////////////////////////////////////// abstract class WorkUnitDataType { //============================================== // consts / vars //============================================== const NoneDataType = 0; const BoolDataType = 1; const NumericDataType = 2; const StringDataType = 3; const ArrayDataType = 4; const JsonDataType = 5; const UrlDataType = 6; const FileDataType = 7; private static $cachedConstantArr; private $value; private $name; //============================================== // construct //============================================== final public function __construct() { $name = get_class($this); $this->value = WorkUnitDataType::getValueFromName($name); $this->name = $name; } //============================================== // accessing //============================================== final public function getName() { return $this->name; } final public function getValue() { return $this->value; } //============================================== // convenience //============================================== final public static function NoneDataType() { return new NoneDataType();} final public static function BoolDataType() { return new BoolDataType();} final public static function NumericDataType(){ return new NumericDataType();} final public static function StringDataType() { return new StringDataType();} final public static function ArrayDataType() { return new ArrayDataType();} final public static function JsonDataType() { return new JsonDataType();} final public static function UrlDataType() { return new UrlDataType();} final public static function FileDataType() { return new FileDataType();} //============================================== // utility //============================================== final private static function getConstants() { if (self::$cachedConstantArr == NULL) { self::$cachedConstantArr = array(); } $calledClass = get_called_class(); if (!array_key_exists($calledClass, self::$cachedConstantArr)) { $reflect = new ReflectionClass($calledClass); self::$cachedConstantArr[$calledClass] = $reflect->getConstants(); } return self::$cachedConstantArr[$calledClass]; } final public static function getNameFromValue($const) { foreach (self::getConstants() as $name => $value) { if ($value == $const) { return $name; } } return Null; } final public static function getValueFromName($text) { foreach (self::getConstants() as $name => $value) { if ($name == $text) { return $value; } } return -1; } } class NoneDataType extends WorkUnitDataType {} class BoolDataType extends WorkUnitDataType {} class NumericDataType extends WorkUnitDataType {} class StringDataType extends WorkUnitDataType {} class ArrayDataType extends WorkUnitDataType {} class JsonDataType extends WorkUnitDataType {} class UrlDataType extends WorkUnitDataType {} class FileDataType extends WorkUnitDataType {} $a = WorkUnitDataType::NoneDataType(); var_dump($a); echo "\n\n"; echo $a->toString() . "\n"; echo $a->toValue() . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  131     0  E >   INIT_STATIC_METHOD_CALL                                  'WorkUnitDataType', 'NoneDataType'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
  132     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
  133     6        ECHO                                                     '%0A%0A'
  134     7        INIT_METHOD_CALL                                         !0, 'toString'
          8        DO_FCALL                                      0  $4      
          9        CONCAT                                           ~5      $4, '%0A'
         10        ECHO                                                     ~5
  135    11        INIT_METHOD_CALL                                         !0, 'toValue'
         12        DO_FCALL                                      0  $6      
         13        CONCAT                                           ~7      $6, '%0A'
         14        ECHO                                                     ~7
         15      > RETURN                                                   1

Class WorkUnitDataType:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  __construct
number of ops:  11
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E >   FETCH_THIS                                       ~1      
          1        GET_CLASS                                        ~2      ~1
          2        ASSIGN                                                   !0, ~2
   42     3        INIT_STATIC_METHOD_CALL                                  'WorkUnitDataType', 'getValueFromName'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $5      
          6        ASSIGN_OBJ                                               'value'
          7        OP_DATA                                                  $5
   43     8        ASSIGN_OBJ                                               'name'
          9        OP_DATA                                                  !0
   44    10      > RETURN                                                   null

End of function __construct

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  getName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   FETCH_OBJ_R                                      ~0      'name'
          1      > RETURN                                                   ~0
   53     2*     > RETURN                                                   null

End of function getname

Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  getValue
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   56     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1      > RETURN                                                   ~0
   57     2*     > RETURN                                                   null

End of function getvalue

Function nonedatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  NoneDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   64     0  E >   NEW                                              $0      'NoneDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function nonedatatype

Function booldatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  BoolDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   65     0  E >   NEW                                              $0      'BoolDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function booldatatype

Function numericdatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  NumericDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   66     0  E >   NEW                                              $0      'NumericDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function numericdatatype

Function stringdatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  StringDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   67     0  E >   NEW                                              $0      'StringDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function stringdatatype

Function arraydatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  ArrayDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   68     0  E >   NEW                                              $0      'ArrayDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function arraydatatype

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

End of function jsondatatype

Function urldatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  UrlDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   70     0  E >   NEW                                              $0      'UrlDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function urldatatype

Function filedatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  FileDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   71     0  E >   NEW                                              $0      'FileDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function filedatatype

Function getconstants:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 20
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 5
filename:       /in/uuKmK
function name:  getConstants
number of ops:  24
compiled vars:  !0 = $calledClass, !1 = $reflect
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   79     0  E >   FETCH_STATIC_PROP_R          unknown             ~2      'cachedConstantArr'
          1        IS_EQUAL                                                 ~2, null
          2      > JMPZ                                                     ~3, ->5
   80     3    >   ASSIGN_STATIC_PROP                                       'cachedConstantArr'
          4        OP_DATA                                                  <array>
   83     5    >   GET_CALLED_CLASS                                 ~5      
          6        ASSIGN                                                   !0, ~5
   85     7        FETCH_STATIC_PROP_R          unknown             ~7      'cachedConstantArr'
          8        ARRAY_KEY_EXISTS                                 ~8      !0, ~7
          9        BOOL_NOT                                         ~9      ~8
         10      > JMPZ                                                     ~9, ->20
   86    11    >   NEW                                              $10     'ReflectionClass'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !1, $10
   88    15        INIT_METHOD_CALL                                         !1, 'getConstants'
         16        DO_FCALL                                      0  $15     
         17        FETCH_STATIC_PROP_W          unknown             $13     'cachedConstantArr'
         18        ASSIGN_DIM                                               $13, !0
         19        OP_DATA                                                  $15
   91    20    >   FETCH_STATIC_PROP_R          unknown             ~16     'cachedConstantArr'
         21        FETCH_DIM_R                                      ~17     ~16, !0
         22      > RETURN                                                   ~17
   92    23*     > RETURN                                                   null

End of function getconstants

Function getnamefromvalue:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/uuKmK
function name:  getNameFromValue
number of ops:  14
compiled vars:  !0 = $const, !1 = $value, !2 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   94     0  E >   RECV                                             !0      
   95     1        INIT_STATIC_METHOD_CALL                                  'getConstants'
          2        DO_FCALL                                      0  $3      
          3      > FE_RESET_R                                       $4      $3, ->11
          4    > > FE_FETCH_R                                       ~5      $4, !1, ->11
          5    >   ASSIGN                                                   !2, ~5
   96     6        IS_EQUAL                                                 !1, !0
          7      > JMPZ                                                     ~7, ->10
   97     8    >   FE_FREE                                                  $4
          9      > RETURN                                                   !2
   95    10    > > JMP                                                      ->4
         11    >   FE_FREE                                                  $4
  101    12      > RETURN                                                   null
  102    13*     > RETURN                                                   null

End of function getnamefromvalue

Function getvaluefromname:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/uuKmK
function name:  getValueFromName
number of ops:  14
compiled vars:  !0 = $text, !1 = $value, !2 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  104     0  E >   RECV                                             !0      
  105     1        INIT_STATIC_METHOD_CALL                                  'getConstants'
          2        DO_FCALL                                      0  $3      
          3      > FE_RESET_R                                       $4      $3, ->11
          4    > > FE_FETCH_R                                       ~5      $4, !1, ->11
          5    >   ASSIGN                                                   !2, ~5
  106     6        IS_EQUAL                                                 !2, !0
          7      > JMPZ                                                     ~7, ->10
  107     8    >   FE_FREE                                                  $4
          9      > RETURN                                                   !1
  105    10    > > JMP                                                      ->4
         11    >   FE_FREE                                                  $4
  111    12      > RETURN                                                   -1
  112    13*     > RETURN                                                   null

End of function getvaluefromname

End of class WorkUnitDataType.

Class NoneDataType:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  __construct
number of ops:  11
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E >   FETCH_THIS                                       ~1      
          1        GET_CLASS                                        ~2      ~1
          2        ASSIGN                                                   !0, ~2
   42     3        INIT_STATIC_METHOD_CALL                                  'WorkUnitDataType', 'getValueFromName'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $5      
          6        ASSIGN_OBJ                                               'value'
          7        OP_DATA                                                  $5
   43     8        ASSIGN_OBJ                                               'name'
          9        OP_DATA                                                  !0
   44    10      > RETURN                                                   null

End of function __construct

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  getName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   FETCH_OBJ_R                                      ~0      'name'
          1      > RETURN                                                   ~0
   53     2*     > RETURN                                                   null

End of function getname

Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  getValue
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   56     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1      > RETURN                                                   ~0
   57     2*     > RETURN                                                   null

End of function getvalue

Function nonedatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  NoneDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   64     0  E >   NEW                                              $0      'NoneDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function nonedatatype

Function booldatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  BoolDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   65     0  E >   NEW                                              $0      'BoolDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function booldatatype

Function numericdatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  NumericDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   66     0  E >   NEW                                              $0      'NumericDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function numericdatatype

Function stringdatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  StringDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   67     0  E >   NEW                                              $0      'StringDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function stringdatatype

Function arraydatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  ArrayDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   68     0  E >   NEW                                              $0      'ArrayDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function arraydatatype

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

End of function jsondatatype

Function urldatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  UrlDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   70     0  E >   NEW                                              $0      'UrlDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function urldatatype

Function filedatatype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uuKmK
function name:  FileDataType
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   71     0  E >   NEW                                              $0      'FileDataType'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function filedatatype

Function getconstants:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 20
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 5
filename:       /in/uuKmK
function name:  getConstants
number of ops:  24
compiled vars:  !0 = $calledClass, !1 = $reflect
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   79     0  E >   FETCH_STATIC_PROP_R          unknown             ~2      'cachedConstantArr'
          1        IS_EQUAL                                                 ~2, null
          2      > JMPZ                                                     ~3, ->5
   80     3    >   ASSIGN_STATIC_PROP                                       'cachedConstantArr'
          4        OP_DATA                                                  <array>
   83     5    >   GET_CALLED_CLASS                                 ~5      
          6        ASSIGN                                                   !0, ~5
   85     7        FETCH_STATIC_PROP_R          unknown             ~7      'cachedConstantArr'
          8        ARRAY_KEY_EXISTS                                 ~8      !0, ~7
          9        BOOL_NOT                                         ~9      ~8
         10      > JMPZ                                                     ~9, ->20
   86    11    >   NEW                                              $10     'ReflectionClass'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !1, $10
   88    15        INIT_METHOD_CALL                                         !1, 'getConstants'
         16        DO_FCALL                                      0  $15     
         17        FETCH_STATIC_PROP_W          unknown             $13     'cachedConstantArr'
         18        ASSIGN_DIM                                               $13, !0
         19        OP_DATA                                                  $15
   91    20    >   FETCH_STATIC_PROP_R          unknown             ~16     'cachedConstantArr'
         21        FETCH_DIM_R                                      ~17     ~16, !0
         22      > RETURN                                                   ~17
   92    23*     > RETURN                                                   null

End of function getconstants

Function getnamefromvalue:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/uuKmK
function name:  getNameFromValue
number of ops:  14
compiled vars:  !0 = $const, !1 = $value, !2 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   94     0  E >   RECV                                             !0      
   95     1        INIT_STATIC_METHOD_CALL                                  'getConstants'
          2        DO_FCALL                                      0  $3      
          3      > FE_RESET_R                                       $4      $3, ->11
          4    > > FE_FETCH_R                                       ~5      $4, !1, ->11
          5    >   ASSIGN                                                   !2, ~5
   96     6        IS_EQUAL                                                 !1, !0
          7      > JMPZ                                                     ~7, ->10
   97     8    >   FE_FREE                                                  $4
          9      > RETURN                                                   !2
   95    10    > > JMP                                                      ->4
         11    >   FE_FREE                                                  $4
  101    12      > RETURN                                                   null
  102    13*     > RETURN                                                   null

End of function getnamefromvalue

Function getvaluefromname:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/uuKmK
function name:  getValueFromName
number of ops:  14
compiled vars:  !0 = $text, !1 = $value, !2 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  104     0  E >   RECV                                             !0      
  105     1        INIT_STATIC_METHOD_CALL                                  'getConstants'
          2        DO_FCALL                                      0  $3      
          3      > FE_RESET_R                                       $4      $3, ->11
          4    > > FE_FETCH_R                                       ~5      $4, !1, ->11
          5    >   ASSIGN                                                   !2, ~5
  106     6        IS_EQUAL                                                 !2, !0
          7      > JMPZ                                                     ~7, ->10
  107     8    >   FE_FREE                                                  $4
          9      > RETURN                                                   !1
  105    10    > > JMP                                                      ->4
         11    >   FE_FREE                                                  $4
  111    12      > RETURN                                                   -1
  112    13*     > RETURN                                                   null

End of function g

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
368.39 ms | 1428 KiB | 17 Q