Skip to content

Instantly share code, notes, and snippets.

@cursosdesarrolloweb
Created Nov 28, 2020
Embed
What would you like to do?
<?php
class User {
public function __construct(
public mixed $user,
) {}
}
$userArray = new User(["Israel", 39]);
$userClass = new User(new class { public string $name = "Israel"; public int $age = 39; });
function getUsername(): mixed {
return "cursosdesarrolloweb";
}
echo getUsername();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment