3v4l.org

run code in 300+ PHP versions simultaneously
<?php $row->check_out = 5; $row->check_in = 2; echo "<tr align=center> <td>$row->check_in</td> <td>$row->check_out</td> <td>$row->email</td> <td>$row->price</td> <td>" . ($row->check_out - $row->check_in) . "</td> <td>$row->date_created</td> </tr>"; // orr........ ?> <?php $row->check_out = 5; $row->check_in = 2; ?> <tr align="center"> <td><?=$row->check_in?></td> <td><?=$row->check_out?></td> <td><?=$row->email?></td> <td><?=$row->price?></td> <td><?=($row->check_out - $row->check_in)?></td> <td><?=$row->date_created?></td> </tr>
Output for 8.0.0 - 8.0.12, 8.1rc1 - rc3
Fatal error: Uncaught Error: Attempt to assign property "check_out" on null in /in/cGtnT:3 Stack trace: #0 {main} thrown in /in/cGtnT on line 3
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.25
Warning: Creating default object from empty value in /in/cGtnT on line 3 Notice: Undefined property: stdClass::$email in /in/cGtnT on line 8 Notice: Undefined property: stdClass::$price in /in/cGtnT on line 9 Notice: Undefined property: stdClass::$date_created in /in/cGtnT on line 11 <tr align=center> <td>2</td> <td>5</td> <td></td> <td></td> <td>3</td> <td></td> </tr> <tr align="center"> <td>2</td> <td>5</td> <td> Notice: Undefined property: stdClass::$email in /in/cGtnT on line 28 </td> <td> Notice: Undefined property: stdClass::$price in /in/cGtnT on line 29 </td> <td>3</td> <td> Notice: Undefined property: stdClass::$date_created in /in/cGtnT on line 31 </td> </tr>
Output for 5.2.6 - 5.2.17, 5.3.0 - 5.3.29
Strict Standards: Creating default object from empty value in /in/cGtnT on line 3 Notice: Undefined property: stdClass::$email in /in/cGtnT on line 8 Notice: Undefined property: stdClass::$price in /in/cGtnT on line 9 Notice: Undefined property: stdClass::$date_created in /in/cGtnT on line 11 <tr align=center> <td>2</td> <td>5</td> <td></td> <td></td> <td>3</td> <td></td> </tr> <tr align="center"> <td><?=$row->check_in?></td> <td><?=$row->check_out?></td> <td><?=$row->email?></td> <td><?=$row->price?></td> <td><?=($row->check_out - $row->check_in)?></td> <td><?=$row->date_created?></td> </tr>
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.5
Strict Standards: Creating default object from empty value in /in/cGtnT on line 3 Notice: Undefined property: stdClass::$email in /in/cGtnT on line 8 Notice: Undefined property: stdClass::$price in /in/cGtnT on line 9 Notice: Undefined property: stdClass::$date_created in /in/cGtnT on line 11 <tr align=center> <td>2</td> <td>5</td> <td></td> <td></td> <td>3</td> <td></td> </tr> <tr align="center"> <td><?=$row->check_in?></td> <td><?=$row->check_out?></td> <td><?=$row->email?></td> <td><?=$row->price?></td> <td><?=($row->check_out - $row->check_in)?></td> <td><?=$row->date_created?></td> </tr>
Output for 4.3.1 - 4.3.11, 4.4.0 - 4.4.9
Notice: Undefined property: email in /in/cGtnT on line 8 Notice: Undefined property: price in /in/cGtnT on line 9 Notice: Undefined property: date_created in /in/cGtnT on line 11 <tr align=center> <td>2</td> <td>5</td> <td></td> <td></td> <td>3</td> <td></td> </tr> <tr align="center"> <td><?=$row->check_in?></td> <td><?=$row->check_out?></td> <td><?=$row->email?></td> <td><?=$row->price?></td> <td><?=($row->check_out - $row->check_in)?></td> <td><?=$row->date_created?></td> </tr>

preferences:
33.99 ms | 468 KiB | 5 Q