- var_dump: documentation ( source)
<?php
class Test {
protected $hi = 'protected';
private $test = 'private';
public $public = 'public';
public function toInt(string $test) :int {
return $test;
}
}
$t = new Test();
var_dump($t->toInt("123"));