3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Создаем новый класс Coor: class Coor { // данные (свойства): var $name; // методы: function Getname() { echo "<h3>John</h3>"; } } // Создаем объект класса Coor: $object = new Coor; // Получаем доступ к членам класса: $object->name = "Alex"; echo $object->name; // Выводит 'Alex' // А теперь получим доступ к методу класса (фактически, к функции внутри класса): $object->Getname(); // Выводит 'John' заглавными буквами ?>
Output for git.master, git.master_jit, rfc.property-hooks
Alex<h3>John</h3>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
45.56 ms | 401 KiB | 8 Q