<?php
/*
class ReflectionEnum
{
public function __construct(string $name);
public function getCases(): array;
}
class ReflectionEnumCase
{
public function getAttributes(): array;
}
trait AsScalar
{
public function toScalar(string $which);
public static function fromScalar(string $which, $scalar): static;
}
enum Suit
{
use AsScalar;
#[Scalar('db', 'h'), Scalar('json', 'hearts')] case Hearts;
#[Scalar('db', 'd'), Scalar('json', 'diamonds')] case Diamonds;
#[Scalar('db', 'c'), Scalar('json', 'clubs')] case Clubs;
#[Scalar('db', 's'), Scalar('json', 'spades')] case Spades;
}
echo Suit::Hearts->toScalar('db'); // h
echo Suit::Hearts->toScalar('json'); // hearts
echo Suit::fromScalar('db', 'h'); // Hearts
echo Suit::fromScalar('json', 'hearts'); // Hearts
*/
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/mvGZu
function name: (null)
number of ops: 1
compiled vars: none
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
37 0 E > > RETURN 1