Netbeans + PHP + readline:没有提示字符串

I am using Netbeans to develop PHP console application samples (just for fun and proof of concept). readline is a library binding that takes a string from the console. For example, be read.php a file with the following content:

<?php
$line = readline("Name: ");
echo "$line
";
?>

I can execute it as (gnome-terminal + bash)

php read.php

And it will outputs like

Name: Firstname Lastname
Firstname Lastname

So far so good.

When I put this code inside Netbeans, the console also inside Netbeans, it does not echo the prompt "Name: ". For example, this is a screenshot took after SHIFT+F6 pressed Sample screenshot

Any insights towards how to overcome this?