3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum Test: string { case AUTHENTICATED = 'authenticated'; case COURSES_ADMIN = 'courses.admin'; case BUNDLES_ADMIN = 'bundles.admin'; case COURSES_REPORTING_ACCESS = 'courses-reporting.access'; case B2B_DASHBOARD_ACCESS = 'b2b-dashboard.access'; case INSTRUCTORS_ADMIN = 'instructors.admin'; case USERS_ADMIN = 'users.admin'; case COUPONS_ADMIN = 'coupons.admin'; } $data = [ Test::COURSES_ADMIN, Test::COURSES_REPORTING_ACCESS, Test::BUNDLES_ADMIN, Test::USERS_ADMIN, Test::B2B_DASHBOARD_ACCESS, Test::B2B_DASHBOARD_ACCESS, Test::INSTRUCTORS_ADMIN, Test::INSTRUCTORS_ADMIN, Test::COUPONS_ADMIN, Test::AUTHENTICATED, ]; $data = array_unique($data, flags: SORT_REGULAR); var_dump($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f3XVY
function name:  (null)
number of ops:  31
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'test'
   18     1        FETCH_CLASS_CONSTANT                             ~1      'Test', 'COURSES_ADMIN'
          2        INIT_ARRAY                                       ~2      ~1
   19     3        FETCH_CLASS_CONSTANT                             ~3      'Test', 'COURSES_REPORTING_ACCESS'
          4        ADD_ARRAY_ELEMENT                                ~2      ~3
   20     5        FETCH_CLASS_CONSTANT                             ~4      'Test', 'BUNDLES_ADMIN'
          6        ADD_ARRAY_ELEMENT                                ~2      ~4
   21     7        FETCH_CLASS_CONSTANT                             ~5      'Test', 'USERS_ADMIN'
          8        ADD_ARRAY_ELEMENT                                ~2      ~5
   22     9        FETCH_CLASS_CONSTANT                             ~6      'Test', 'B2B_DASHBOARD_ACCESS'
         10        ADD_ARRAY_ELEMENT                                ~2      ~6
   23    11        FETCH_CLASS_CONSTANT                             ~7      'Test', 'B2B_DASHBOARD_ACCESS'
         12        ADD_ARRAY_ELEMENT                                ~2      ~7
   24    13        FETCH_CLASS_CONSTANT                             ~8      'Test', 'INSTRUCTORS_ADMIN'
         14        ADD_ARRAY_ELEMENT                                ~2      ~8
   25    15        FETCH_CLASS_CONSTANT                             ~9      'Test', 'INSTRUCTORS_ADMIN'
         16        ADD_ARRAY_ELEMENT                                ~2      ~9
   26    17        FETCH_CLASS_CONSTANT                             ~10     'Test', 'COUPONS_ADMIN'
         18        ADD_ARRAY_ELEMENT                                ~2      ~10
   27    19        FETCH_CLASS_CONSTANT                             ~11     'Test', 'AUTHENTICATED'
         20        ADD_ARRAY_ELEMENT                                ~2      ~11
   17    21        ASSIGN                                                   !0, ~2
   30    22        INIT_FCALL                                               'array_unique'
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 0
         25        DO_ICALL                                         $13     
         26        ASSIGN                                                   !0, $13
   32    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.11 ms | 1000 KiB | 15 Q