1<?php
2class StrValTest
3{
4 public function __toString()
5 {
6 return __CLASS__;
7 }
8}
9
10// Prints 'StrValTest'
11echo strval(new StrValTest);
12?>
1<?php
2require 'flag.php';
3if (isset($_POST['password'])) {
4 if (strcmp($_POST['password'], $flag) == 0)
5 echo('<h1><div class="alert alert-success centered" role="alert"> Flag: '.$flag.' </div></h1>');
6 else
7 echo('<h1><div class="alert alert-danger centered" role="alert">Sorry, Wrong password!</div></h1>');
8die;
9}
10?>