Comments

These are comments left by visitors. Leave a comment if you want to say hi, found something on the website that needs some adjustment, or want to tell everyone how your day is going.

Authentication required

You need to log in to post a comment

Log in
- Avatar
- - 3 weeks ago
There is a syntax highlighting problem with this code snippet: try { throw new Exception("test"); } catch (Exception $e) { $error_info = <<<EOD Error: {$e->getMessage()} Error File: {$e->getFile()} Error Trace: {$e->getTraceAsString()} EOD; echo $error_info; } It works fine if you remove the spaces before EOD

firstname lastname Avatar
firstname lastname - 1 month ago
This is a great tool! I'd vote for the main php.net documentation to incorporate this into it. It helps 100% get stuff done.

jack alexander zimmer Avatar
jack alexander zimmer - 2 months ago
i wonder how many functions ill have by the time i Die....

Bruno G. Avatar
Bruno G. - 2 months ago
It would be nice if the "Current" checkboxes stayed on the current versions. As it is, if you select 8.3.9 in the Current section, the selected PHP version will stay on 8.3.9 even after 8.3.10 comes out. Great tool anyway! So great for quick tests!

Андрей Баранов Avatar
Андрей Баранов - 3 months ago
Hello. Please add FILTER_* constants for "filter_var"

Chris Smith Avatar
Chris Smith - 5 months ago
Any chance we can get the "Font Family" and "Font Size" moved to user settings ? Maybe some of the other editor settings. So that we can set it once and not have to re-set it per computer / browser. I actually have so many browser / OS platform combos, it would be so much easier to set it once. Thanks for the better editor. I tried a couple of the others, then found this one. Signed up and donated right away. Being on disability I could not afford that much but I'll try to add more next month.

Jeroen Avatar
Jeroen - 5 months ago
Thank you for the suggestion and donation! I'll see what I can do with the settings, maybe a checkbox to save all settings to your account instead of only localstorage.

General.Exe Avatar
General.Exe - 1 year ago
What kid of PHP editor doesn't download scripts as a .PHP? That is STUPID. No one wants a script to be a crappy .TXT.

Jeroen Avatar
Jeroen - 1 year ago
Most browsers detect a .php file as unsafe to download. No such problems with .txt

Adekunle Adeyinka (Aquadek1) Avatar
Adekunle Adeyinka (Aquadek1) - 1 year ago
Cool

Abelstrome Avatar
Abelstrome - 1 year ago
This is a great resouce. Excellent work.

Hendra Gunawan Avatar
Hendra Gunawan - 1 year ago
Hello Jeroen. I am thinking about some features which can be source of your income. People need to do technical chore task. Based on my experience, this is not trivial. You can create charged services for it. These are basic ideas and its esential requirements, the rest is your imagination. - Lecturers need to deliver their lessons to the classroom. At least you must provide introduction field, workflow & navigation field, and the code field. - Some institutions need to assess their member/potential member about their coding skill. Obviously you must provide questions fields for accessor, and answer fields for people being tested. - more ideas to come. some considerations: - when, where, and who access those services. - "My Script" become "My Project". - cloneable project, rather than writing from scratch. - share projects among people who use the services. As a marketing point, people can get free space permanently for code which is mentioned in community forums/mailing lists. For example: https://externals.io, https://forum.joomla.org, and many more. A need for additional field in "My Scripts": "referenced in". The code must be prevented for deletion. Consider to use github issues to get feedback from users, even though your app is not placed there. Your existing comment feature is not enough, and it will be bloated sooner or later.

General.Exe Avatar
General.Exe - 1 year ago
Why do you want everyone to pay. are you stupid?

Hendra Gunawan Avatar
Hendra Gunawan - 1 year ago
Great job Jeroen!. Years i had been using your sandbox with archaic display. Waiting so long, I was switch to https://3v4l.org. Now my sore eyes are gone. Thanks for free 50 scripts space. some sugestion: - add tag and note field for saved script. title is not descriptive enough. - feature for promoting/listing good quality user scripts. Users can choose their own script to put into that list in order to gather stars from other users. other users can give stars (1-5) to any scripts after reviewing it. calculate the average stars. If possible, users can comment to the script. - to get people motivated, another free 25 script space for users who earn at least 5 scripts with 4 stars average from 20 users.

Jeroen Avatar
Jeroen - 1 year ago
Thank you so much Hendra for the feedback! These are all great ideas, I will be implementing these features soon! Fullscreen can be expanded by simply dragging the editor down to the size you want, maybe I can make it so it sets it to 100% automatically.

Bob Mallozzisky Avatar
Bob Mallozzisky - 2 years ago
test

Roy Rivers Avatar
Roy Rivers - 6 months ago
voy por ti att pelle

Grzegorz Pietrzak Avatar
Grzegorz Pietrzak - 2 years ago
Hmm just an idea, maybe not useful but I want to share. What if we click (ctrl + left mouse click) on some function (for example substr) then php docs will be opened in new tab with docs to the function?

Jeroen Avatar
Jeroen - 2 years ago
At the moment you can do ctrl +space for autocompletion, or enable autocomplete in the options. It will show "some" docs. I can link this to the actual docs on the website if you thinks it's useful?

Alan Kmiecik Avatar
Alan Kmiecik - 2 years ago
Is there a way to get easterdate() to work? I get the message: Uncaught Error: Call to undefined function easter_date() in /home/user/scripts/code.php:2 thanks

Jeroen Avatar
Jeroen - 2 years ago
I went ahead and compiled the calendar extension on the latest PHP versions. At the moment the compiler is running to install it on older versions as well, hopefully by the end of the day all versions have the calendar extension installed and easter_days() will work on all of them. Thank you for the suggestion!

Hà Lê Avatar
Hà Lê - 2 years ago
Like can we have some auto save into local storage for the code pls? Its really annoying me when i code a really long function and then f5 the page then all the code i have done its completely lost? Can you fix this pls.

Jeroen Avatar
Jeroen - 2 years ago
Yes, enable "autoload" in the options. I think "Autosave" is a better name though, I'll change that and enable it by default. When you enable the option and you haven't pressed "execute" yet, your code should be still in your local storage.

Huush Avatar
Huush - 2 years ago
Hi, I'm a very new user to the site. Very happy to have found this as I'm new to PHP and having this compiler/exec has made my PHP coding life so much better in just 24 hours! So, thank you! An issue I'm encountering - and not surprised to do so - is that network access is disabled. I completely understand why(s). However, I'm needing to test some functionality around the curl_* set of functions. For exampe, in my current test I'm needing to return/evaluate the getinfo results of whether a page can be accessed or a file exists, codes, size, etc and then process based upon the results. When I attempt any curl action, there is NO result. This is different to a failure which would be a component of what I also need to account for. There's no search function on the comments section so I'm not sure if this has been requested/resolved/rejected in the past. Is there an internal sandbox address or single external address (ideally with some basic read only files) that is or can be enabled for such testing? Such would be very handy as attempting to build a manual attribute list for comparison is time consuming and has the chance to introduce errors.

Jeroen Avatar
Jeroen - 2 years ago
Thank you for your comment! To avoid abuse of the service, network access is disabled, and curl functions won't work for that reason. It should show you an error when it doesn't return within time. Abuse of network would be something like a loop to ddos a website or a script could be used as a proxy. I'd suggest setting up something local, like a docker container or mamp/wamp. I like the idea of an internal way to do this and would be reasonably easy to implement, but has to be documented. Maybe I can reroute all traffic to some internal files instead.

Huush Avatar
Huush - 2 years ago
Just for clarity, the current behaviour for the curl_exec function doesn't return any response and there's no timeout. It executes quickly but returns empty results. e.g. HTTP_RESPONSE_CODE is null. The only attributes that are set are the time attributes and these are very small values.

Jeroen Avatar
Jeroen - 2 years ago
Ahh, thank you for that! The error is in curl_error(), but that might not be very clear for people using it.

Huush Avatar
Huush - 2 years ago
Thanks Jeroen. And especially for the fast response. That's one of the reasons I expected it was disabled. The internal reroute to a location & set known files with some local onlinephp.io documentation (happy to help if I can) detailing expected response is exactly what I was thinking. I'm not certain what the failure response would be like, but may get lucky and failures (e.g. HTTP_RESPONSECODE) might just work if the top level address is accessible. Alternately, just cater for success cases and failure conditions remain outside of scope of what's available. I'm not sure if you've created local versions of the pages detailing the PHP functions but would be great to link that doco into those curl* pages as they don't indicate at all that network access is disabled. I spent a fair bit of time debugging and trying different urls before I finally came across the note confirming that network access was disabled. :)

Jeroen Avatar
Jeroen - 2 years ago
Hi Huush! I just finished the behavior. All network access in the sandbox is now rerouted to an internal webserver that catches all traffic to all websites. When someone uses a network function, a warning is shown that can be dismissed with some info: https://onlinephp.io/faq/curl_network. I adde a bunch of test files for some common types, added a basic authentication page and a route to request status errors. Hope this clears things up and is useful to people. Thanks!

Matej Avatar
Matej - 2 years ago
Thanks: First of all, thank you. I'm using your services for years now, and I appreciate your site immensely. Intro: Since PHP 7.4 there is a null coalescing assignment operator (??=). It sets the variable on the left with the value of the expression on the right if and only if the variable is undefined or null, to begin with. Issue: I'm using PHP 8.1 and while the code where I use this operator works great, I would like to point out that the editor shows there's an error in my code. Example: public function test($var = null) { $var ??= 0; // PHP Code Editor: Syntax error, unexpected '=' return $var + 1; }

Jeroen Avatar
Jeroen - 2 years ago
I spent most of the day updating the ACE editor code to support PHP 8.1 and updated it on the website. You can see a demo with most new functionality here: https://onlinephp.io/c/php8.1-aceeditor-demo. I submitted my code to the ACE repo on github so other people using this editor will benefit too. Thanks again!

Jeroen Avatar
Jeroen - 2 years ago
Thank you for this! I use the ace editor on this website. It a seems they don't support the safe null operator yet. When I have some time I'll look into this and contribute a fix or wait for an update

webtrekker UK Avatar
webtrekker UK - 2 years ago
Excellent work! Well done! This is a very useful PHP editor and previewer, available everywhere too rather than only as a dedicated installation. Only one thing I would like to see implemented and that would be the option to view the editor full screen. I know the panes can be dragged to size but a fullscreen button would be a nice addition IMHO.

Jeroen Avatar
Jeroen - 2 years ago
That is a great idea! I'll implement this soon. Thank you!

webtrekker UK Avatar
webtrekker UK - 2 years ago
Much appreciated, and thank you for such a quick response.

Jeroen Avatar
Jeroen - 2 years ago
I implemented a better full sized editor today. It's not 100% full-screen, but I think this should do the trick. Thanks again for the suggestion!

Hendra Gunawan Avatar
Hendra Gunawan - 1 year ago
ideally, fullscreen would eats all four sides, not just left and right.

Toby Avatar
Toby - 2 years ago
I really like how this page has evolved over the last few weeks. Thank you! I really like it!

Kylychbek Turdakunov Avatar
Kylychbek Turdakunov - 2 years ago
[like]

Juuso Turunen Avatar
Juuso Turunen - 2 years ago
Cool!

Jeroen Avatar
Jeroen - 2 years ago
Hi, welcome to the new comment system. It needs some work, but it works for now.

MouseZver Avatar
MouseZver - 2 years ago
test test test

Roy Rivers Avatar
Roy Rivers - 6 months ago
voy por tiii att pelle

Jeroen Avatar
Jeroen - 2 years ago
That worked :)

     Duy Thiện Avatar
Duy Thiện - 2 years ago
:D

Archived comments

Facebook comments (April 2018 - April 2022)
Discuss comments (February 2009 - April 2018)

Archived comments

Facebook (April 2018 - April 2022)
Discuss (February 2009 - April 2018)

Most used PHP functions

Last used PHP functions