<?php declare(strict_types=1); $i = 1; $s = ''; $_type_enforcer = new class($i, $s) { public function __construct( public int &$i, public string &$s ) {} }; try { $i = ''; } catch (\Throwable $e) { echo $e->getMessage(), PHP_EOL; } try { $s = 1; } catch (\Throwable $e) { echo $e->getMessage(), PHP_EOL; } unset($_type_enforcer); try { $i = ''; } catch (\Throwable $e) { echo $e->getMessage(), PHP_EOL; } try { $s = 1; } catch (\Throwable $e) { echo $e->getMessage(), PHP_EOL; }
You have javascript disabled. You will not be able to edit any code.