{"guid":"iGLehsTsCdbii2A4HQaJFg","title":"PHP Extension Development with C++","subtitle":"Wrapping a C preprocessor API in C++","slug":"froscon2012-1034-php_extension_development_with_c","link":"http://programm.froscon.de/2012/events/1034.html","description":"Since the PHP core and the extension API are implemented in C, most\nPHP extensions are written in C, too. But it is possible to write\nextensions using the C API and a C++ compiler. This has the advantage\nthat you can use all the nice features of C++, like object\norientation, exceptions, templates and the STL. Apart from using these\nfeatures in the extension code, they can also be used to wrap parts of\nthe PHP extension API, to provide a cleaner interface.\n\nI will show what such a wrapper could look like, by starting with a\nregular C style PHP extension which gets extended using C++ features\nand small wrappers. This results in an extension which is easier to\nwrite.","original_language":"eng","persons":["Florian Sowade"],"tags":["PHP"],"view_count":131,"promoted":false,"date":"2012-08-25T10:00:00.000+02:00","release_date":"2015-10-19T02:00:00.000+02:00","updated_at":"2025-05-25T17:15:03.985+02:00","length":2661,"duration":2661,"thumb_url":"https://static.media.ccc.de/media/conferences/froscon/2012/1034-sd.jpg","poster_url":"https://static.media.ccc.de/media/conferences/froscon/2012/1034-sd_preview.jpg","timeline_url":"https://static.media.ccc.de/media/conferences/froscon/2012/iGLehsTsCdbii2A4HQaJFg-timeline.jpg","thumbnails_url":"https://static.media.ccc.de/media/conferences/froscon/2012/iGLehsTsCdbii2A4HQaJFg-thumbnails.vtt","frontend_link":"https://media.ccc.de/v/froscon2012-1034-php_extension_development_with_c","url":"https://api.media.ccc.de/public/events/iGLehsTsCdbii2A4HQaJFg","conference_title":"FrOSCon 2012","conference_url":"https://api.media.ccc.de/public/conferences/froscon2012","related":[{"event_id":306,"event_guid":"import-1fb1327d2eaed74e68","weight":1},{"event_id":3996,"event_guid":"5dFNdKHRGGOw5ezddlAtZg","weight":1},{"event_id":3999,"event_guid":"d7nPt-RU56uQUFuWMrn1Dg","weight":1},{"event_id":4116,"event_guid":"4ac9fd4c-c351-55c8-bac6-1bb16a5bb44e","weight":1}],"recordings":[{"size":141,"length":2661,"mime_type":"video/mp4","language":"eng","filename":"froscon2012-1034-en-PHP_Extension_Development_with_C_sd.mp4","state":"downloaded","folder":"h264-hq","high_quality":false,"width":720,"height":576,"updated_at":"2016-02-03T14:10:54.829+01:00","recording_url":"https://cdn.media.ccc.de/events/froscon/2012/h264-hq/froscon2012-1034-en-PHP_Extension_Development_with_C_sd.mp4","url":"https://api.media.ccc.de/public/recordings/7999","event_url":"https://api.media.ccc.de/public/events/iGLehsTsCdbii2A4HQaJFg","conference_url":"https://api.media.ccc.de/public/conferences/froscon2012"},{"size":30,"length":2661,"mime_type":"audio/opus","language":"eng","filename":"froscon2012-1034-en-PHP_Extension_Development_with_C_opus.opus","state":"downloaded","folder":"opus","high_quality":true,"width":null,"height":null,"updated_at":"2015-10-19T20:48:39.449+02:00","recording_url":"https://cdn.media.ccc.de/events/froscon/2012/opus/froscon2012-1034-en-PHP_Extension_Development_with_C_opus.opus","url":"https://api.media.ccc.de/public/recordings/8000","event_url":"https://api.media.ccc.de/public/events/iGLehsTsCdbii2A4HQaJFg","conference_url":"https://api.media.ccc.de/public/conferences/froscon2012"},{"size":40,"length":2661,"mime_type":"audio/mpeg","language":"eng","filename":"froscon2012-1034-en-PHP_Extension_Development_with_C_mp3.mp3","state":"downloaded","folder":"mp3-audio-only","high_quality":true,"width":null,"height":null,"updated_at":"2015-10-19T20:48:55.850+02:00","recording_url":"https://cdn.media.ccc.de/events/froscon/2012/mp3-audio-only/froscon2012-1034-en-PHP_Extension_Development_with_C_mp3.mp3","url":"https://api.media.ccc.de/public/recordings/8002","event_url":"https://api.media.ccc.de/public/events/iGLehsTsCdbii2A4HQaJFg","conference_url":"https://api.media.ccc.de/public/conferences/froscon2012"},{"size":277,"length":2661,"mime_type":"video/webm","language":"eng","filename":"froscon2012-1034-en-PHP_Extension_Development_with_C_webm.webm","state":"downloaded","folder":"webm","high_quality":false,"width":720,"height":576,"updated_at":"2016-02-03T14:10:54.890+01:00","recording_url":"https://cdn.media.ccc.de/events/froscon/2012/webm/froscon2012-1034-en-PHP_Extension_Development_with_C_webm.webm","url":"https://api.media.ccc.de/public/recordings/8001","event_url":"https://api.media.ccc.de/public/events/iGLehsTsCdbii2A4HQaJFg","conference_url":"https://api.media.ccc.de/public/conferences/froscon2012"}]}