PHPDeveloper.orghttp://www.phpdeveloper.org
Up-to-the Minute PHP News, views and communityen-usTue, 03 Mar 2015 14:31:57 -060030http://www.phpdeveloper.org/news/21768http://www.phpdeveloper.org/news/21768
The SitePoint PHP blog has a new tutorial posted by i>Miguel Ibarra Romero showing how to use the PsySH tool to do some interactive debugging of your PHP applications via both the command line and a web frontend.

It's 1:00 a.m., the deadline for your web application's delivery is in 8 hours… and it's not working. As you try to figure out what's going on, you fill your code with var_dump() and die() everywhere to see where the bug is. [...] Is this situation familiar to you? PsySH to the rescue. PsySH is a Read-Eval-Print Loop (or REPL). You may have used a REPL before via your browser's javascript console. If you have, you know that it possesses a lot of power and can be useful while debugging your JS code.

He walks you through the install via Composer and some of the basic commands and syntax for executing PHP code inside its shell. Command line testing is good, but debugging full applications is a bit more difficult. He shows how to integrate the tool into a sample application that calls PsySH via a "debug" call and output via a set of "window" objects. He also includes a bit close to the end about debugging with unit tests, executing them from inside the shell as well.

Link: http://www.sitepoint.com/interactive-php-debugging-psysh/]]>Tue, 30 Sep 2014 12:53:30 -0500http://www.phpdeveloper.org/news/20352http://www.phpdeveloper.org/news/20352
On PHPMaster.com a new tutorial has been posted showing how to combine Geocoder PHP with Leaflet.js to create interactive maps. The Leaflet.js library lets you easily create mobile-friendly maps with simplicity and usability in mind.

Interactive maps inside a web application have a lot of great uses. From visualizing data to highlighting points of interest, maps are expected to communicate ideas within the context of location easily. The hardest part, however, is converting that data into coordinates that the map can understand. Luckily, Geocoder PHP allows us to connect to different geo-coding providers. Combined with Leaflet.js, a simple Javascript library, creating maps is a breeze.

He starts by helping you get the Geocoder library installed via Composer and make a sample page (using Bootstrap and jQuery) with a container for the map. He helps you set up Geocoder with an adapter to connect to the service of your choice (like Google Maps, Bing Maps or Openstreatmap). With this configured and created, he inputs some sample data and coverts the addresses to latitude/longitude sets. He walks you through getting Leaflte.js added to the page and pulling in these results via individual generated Javascript variables. You can check out a demo of the end result to see how it all fits together too.

Link: http://www.sitepoint.com/mapping-geocoder-php-leaflet-js/]]>Wed, 06 Nov 2013 10:49:43 -0600http://www.phpdeveloper.org/news/16809http://www.phpdeveloper.org/news/16809
In a new post to his blog Brian Moon describes a need he had for detecting if the client or user calling a PHP script was using an interactive terminal (TTY) or not:

Let's say I am trying to find out why some file import did not happen. Running the job that is supposed to do it may yield an error. Maybe it was a file permission issue or something. There are other people watching the alerts. What they don't know is that I am running the code and looking at these errors in real time.

Since the errors were being sent to the log file, they were lost to the client/user on the other end left staring at their script wondering what went wrong. He ended up with a solution (a pretty simple one too) that uses posix_ttyname and posix_isatty. He includes the little snippet of code he puts in his prepend file that checks for errors then checks for a TTY. If both are there, it turns off logging the errors to the file and sends them direct instead.

]]>Fri, 02 Sep 2011 09:12:47 -0500http://www.phpdeveloper.org/news/16553http://www.phpdeveloper.org/news/16553
In his (Python) blog today Casey reminds the developer community about a handy tool that the developers at Facebook have made available to make a PHP coder's life easier - phpsh.

The developers at Facebook have brought PHP developers a powerful REPL now ala-Python to round out a solid toolbox that PHP developers already have. The project is called phpsh and is written in Python.

He includes the commands you'll need to get it pulled from github and working, providing you with an interactive shell right on your local machine (more powerful than the built-in PHP shell). You can also grab a zip or gzipped archive for download. For complete details on the tool and how to use it, see phpsh.org.

]]>Tue, 05 Jul 2011 11:50:37 -0500http://www.phpdeveloper.org/news/16504http://www.phpdeveloper.org/news/16504
On the Symfony blog they've posted the latest in their "Getting Easier" series looking at some of the things being done for the framework to help make it more appealing for those just coming in. In this new article they look at the new interactive generators that help you create the code you'll need to set up your bundles without a lot of manual effort.

symfony1 has generators for all those things, but until now, Symfony2 was not very good at generating code. Well, that's "fixed" now, thanks to the new GeneratorBundle. The bundle is included by default in Symfony SE (as of 2.0.0 RC1 which will be released on June 24th) and it knows how to generate bundles, forms, Doctrine entities, and simple CRUD controllers to get you started even faster.

A screencast is included in the post showing the process of running the new tool and generate all of the configurations you'll need for a bundle, a Doctrine2 entity, database creation and the CRUD interfaces for a Doctrine entity. You can grab the code for this new bundle from the Sensio github account.

]]>Wed, 22 Jun 2011 10:09:39 -0500http://www.phpdeveloper.org/news/15807http://www.phpdeveloper.org/news/15807
Bence Eros has submitted a new post from his blog that looks at the method he came up with to create an interactive debugger for PHP. It's just a prototype/proof of concept that lets you execute PHP code in the browser (using eval - a little scary, I'll admit).

Last night I created a prototype for an interactive debugger for PHP without the need of any IDE-plugin. In this post I'm going to show what I found. Unfortunately you will need some time to put the environment together, but I think it's worth doing it. My target was to create a way how you can view and modify your variables manually at runtime, only by inserting one line code.

He does mention that, because of the settings he uses, the debugger can only be loaded from a different domain than the application which can be restricted a bit simpler (i.e. its own https or .htauth). His setup uses an Apache2 web server and a few PHP/HTML scripts to get the job done. In the end you'll have something similar to this for you to run your code in.

We are seeking a team-oriented, skilled PHP Programmer to join Apollo in our Culver City office. This is a full-time position. Salary will be in line with candidate's experience, however please provide requirements in your cover letter. Likely candidates will have 2-4 years experience in similar position using PHP/MySQL. You will be part of an established team that is responsible for the development of new Web sites from inception to completion and for performing updates to existing Web sites. Ideal candidates have excellent code/commenting, are able to manage multiple projects, have good communication skills, and a solid understanding of the Web site development process.

Must be able to create a functional Webpage using only Notepad or similar text editor

Expert SQL Knowledge

Strong understanding of Object Oriented Programming

Good understanding of C#, JavaScript, XML and DHTML

BS degree in CS (or similar)

Experience with the following is helpful but not required

Unit Testing

Design Patterns

Online Marketing

Lead Generation

Benefits include Medical, Dental, 401K and annual salary review.

ONLY RESUMES WITH A COVER LETTER STATING YOUR INTEREST AND SALARY EXPECTATIONS WILL BE CONSIDERED.

Email resumes to careers@apollointeractive.com

About Apollo
Apollo Interactive is a full-service Interactive Agency with offices in Culver City, CA and Dallas, TX. Our services include Web Development and Online Advertising for some of America's largest well-known companies like Jack in the Box, Roland, Curves International, Chuck E. Cheese's, The University of Phoenix, and Blue Cross of California.

]]>Wed, 13 Oct 2010 14:45:03 -0500http://www.phpdeveloper.org/news/15183http://www.phpdeveloper.org/news/15183
Jordi Boggiano has a new post today looking at his PHP console script that works in your browser that sets up easily and works from your localhost web server - php-console.

Since I spend most of my days programming PHP I tend to need that a lot and a few years back I wrote a small script that would let me type php code in my browser and execute it. Nothing fancy, but quite useful. Over the years a few people got interest seeing me use it and asked for the sources, so instead of repackaging it every time, I thought I'd clean it up, polish a bit, add some features, and put it on github.

Setup is as simple as dropping the code somewhere in your local server's document root and offers a textarea for input and a expandable tree for the resulting output. It uses the Krumo tool to create this modified output. You can see a screenshot here.

]]>Thu, 10 Dec 2009 10:35:39 -0600http://www.phpdeveloper.org/news/12655http://www.phpdeveloper.org/news/12655
Matt Curry has released a new plugin for running code against a CakePHP installation (either via DebugKit or the command line).

I teased this on twitter last week, so here's the official release. The interactive plugin is a super easy way to run code against your Cake app. You can use it either through a custom panel in the DebugKit or from the command line as a shell.