PHP code example of arokettu / private-access
1. Go to this page and download the library: Download arokettu/private-access 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/ */
arokettu / private-access example snippets
class X {
private $field = 123;
}
$x = new X();
var_dump(\Arokettu\Debug\get_private_field($x, 'field')); // 123
\Arokettu\Debug\set_private_field($x, 'field', 321); // $x->field = 321;