1. Go to this page and download the library: Download misbah/prop-monitor library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
misbah / prop-monitor example snippets
= new \PropMonitor\PropMonitor();
$propertiesToCheck = ['users', 0, 'social', 'github'];
// Returns true
if($monitor->check($users, $propertiesToCheck)) // assuming that we have access to the $users object described above.
{
echo "Yee! John has the github property 8).";
echo "The handle is ".$monitor->get($users, $propertiesToCheck); // This will return @jdoegit
} else {
echo "Oops! John isn't lucky enough to have the mighty github property :(";
}
$result === false
$result === 0
$result === 1
tor = new \PropMonitor\PropMonitor();
$propertiesToCheck = ['users', 0, 'social', 'tumblr'];
// Returns false
if($monitor->check($users, $propertiesToCheck)) // assuming that we have access to the $users object described above.
{
echo "Yee! John has the tumblr property 8).";
} else {
echo "Oops! John isn't lucky enough to have the mighty tumblr property :(";
}
tor = new \PropMonitor\PropMonitor();
$propertiesToCheck = ['users', '0', 'social', 'twitter']; // Look at the mentioned array index
//This will return true though the array index is defined as a string
if($monitor->check($users, $propertiesToCheck)) // assuming that we have access to the $users object described above.
{
echo "Yee! John has the twitter property 8).";
} else {
echo "Oops! John isn't lucky enough to have the mighty twitter property :(";
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.