Here are some useful php command line options that you will love. Ever wanted to test a quick snippet of code without having to save it to a file and then run it? Well check this out! If you invoke php with the -a flag it will drop you into an interactive session. This is nothing […]
While working on my C programming skills I wrote a small program to simulate the functionality of dynamic arrays on other languages. That is arrays that grow as you add elements to them instead of having a fixed size. I decided that is has to be reusable and that you should be able to have […]
This is an introduction to PHP arrays, so if you are new to the language or you just need a refresher you can get up to speed pretty fast. This is how we initialize an empty array and add some elements to it:
|
1 2 |
$chars = array(); array_push($chars,'a','b','c'); |
Then we can see it’s contents using the print_r() function. You […]
Regular expressions, regexp for short, allow us to build expressions for pattern matching. If you aren’t familiar with them you may want to check out some resources here. In Java you can leverage the power of regexp using the pattern and matcher classes, you can import java.util.regex.* to make them available to your program. Let’s […]
Tracing is following all the steps taken by a program, specially function calls/methods, this can be a useful debugging tool when tracking down some problems with your application. In Ruby we have a tracing tool built-in, we can invoke it with ruby -rtracer script.rb but as you can see here it’s not easy to tell […]
