<?php $x = new class (5) { public $holder; public function __construct($classArg) { $this->holder = $classArg; } public function multiplyByNo($multiplier) { return $this->holder * $multiplier; } }; var_dump($x->multiplyByNo(10));
You have javascript disabled. You will not be able to edit any code.