PHP

Zend Studio Upgrade – Where oh where is my PHP content assist?!

Upgrading Zend Studio seems to break the Content Assist feature for PHP.

To get it working again delete the following file:

Zend/workspaces//.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.dltk.ui.prefs

That will force Zend Studio (Eclipse) to create a new DLTK preferences file!

Now if I can only get rid of the java.lang.NullPointerException errors…

Errors occurred during the build.
Errors running builder ‘JavaScript Validator’ on project ‘PROJECT NAME’.
java.lang.NullPointerException

Thursday, September 30th, 2010 PHP 1 Comment

RegEx / Regular Expression for filename and file extension

This is a helpful snippet that I have found myself searching for in the google machine. Hopefully this helps you out!


$filename = "thisismyfilename.ext";

preg_match("/(.*)\.([^\.]+)$/", $filename,  $matches);

print_r($matches);

//Result:
array([0]=>'thisismyfilename.ext',
        [1]=>'thisismyfilename',
        [2]=>'ext')

Wednesday, April 7th, 2010 PHP No Comments
[ad code=1 align=center]