Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
<?php
class NbaClub{
public $name='jordan';
public function __construct($name){
$this->name = $name;
echo "In construct\n";
}
public function __destruct(){
echo "Destroying ".$this->name."\n";
}
}
$james = new NbaClub('james lyn');
echo $james->name."\n"; //james
$james1 = $james;
$james = null;
echo "james will not be used\n";
<html>
<head>
<title>Online PHP Script Execution</title>
</head>
<body>
<?php
$pattern = '/something to look for/';
$lyrics = "Well, my daddy left home when I was three,
and he didn't leave much to Ma and me,
just this old guitar and a bottle of booze.
Now I don't blame him because he run and hid,
but the meanest thing that he ever did was
before he left he went and named me Sue.
Well, he must have thought it was quite a joke,
and it got lots of laughs from a lot of folks,
it seems I had to fight my whole life through.
Some gal would giggle and I'd get red
and some guy would laugh and I'd bust his head,
I tell you, life ain't easy for a boy named Sue.
Source: https://www.familyfriendpoems.com/poem/a-boy-named-sue-by-shel-silverstein";
$aMatch = preg_match($pattern, $lyrics);
echo $aMatch;
?>
</body>
</html>