인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

PHP 7+ 프로그래밍

기초 문법부터 내장 함수, 웹 보안, 게시판 만들기까지 PHP 언어를 시작하는 분들을 위해 바이블이 될 수 있게 만들어보고자 하는 마음으로 이번 강좌를 만들어보았습니다.

입문자를 위해 준비한
[웹 개발, 프로그래밍 언어] 강의입니다.

이런 걸 배울 수 있어요

  • PHP 7+ 기초문법

  • PHP 에서 사용하는 다양한 내장함수들

  • PHP 의 웹 보안 요소들

  • PHP 로 회원제 게시판 만들기

  • PHP 레거시 프로젝트 탈출

더 이상의 레거시는 그만,
과거를 이겨내고 미래로 나아가자!
정상우의 『어썸 라라벨』
어썸 라라벨

PHP 7+ 프로그래밍

기초 문법부터 내장 함수, 웹 보안, 게시판 만들기까지 입문초급단계에서 PHP 언어를 시작하는 분들을 위해 바이블이 될 수 있게 만들어보고자 하는 마음으로 이번 강좌를 만들어보았습니다.

커리큘럼

이번 강좌에서는 PHP 프로그래밍 기초 문법부터 시작하여 내장 함수, 웹 보안, 게시판 만들기까지 웹 개발에 있어서 기초가 될 수 있는 부분을 이야기합니다. 기존에 있던 'PHP 7+ 프로그래밍' 강좌에서 다루지 않았던 여러 내장 함수들이나 게시판에서 단순 구현 뿐만이 아닌 함수화를 통해 코드의 품질 향상까지 도모할 수 있도록 구성해 보았습니다.

꼭 알아야 할 PHP 기초 문법

PHP 7+ 버전에 해당하는 기본적인 문법을 익힙니다. 해당 강좌는 기본적으로 PHP 7.2 버전을 기준으로 하나 PHP 7.4 버전에 등장한 Arrow FunctionSpread Operator in Array 도 커버할 수 있도록 구성하였습니다. 따라서 강의를 천천히 따라오다보면 강의가 제작된 시점으로 최신버전인 PHP 7.4 버전까지 익힐 수 있습니다.

많이 사용하는 PHP 내장 함수들

String, Password Hashing 등 PHP 프로그래밍을 하면서 꼭 알아야 할 내장 함수에 대해 배웁니다. 내용이 많아 보일 수 있지만, 게시판 만들기에서 상당 수 사용하게 됩니다. 다만 단순하게 나열하는 방식으로 진행되기 때문에 지루할 수 있습니다. 따라서 게시판 만들기를 먼저 진행하다가 내장 함수 파트를 보는 것도 한 가지 방법입니다.

*다른 챕터보다 내장 함수에서 유달리 다수의 중도포기가 발생합니다. 레퍼런스 방식으로 진행되므로 재미없기 때문입니다. 전부 다 하려고 하지 마시고, 해당 기능이 필요하다고 생각되는 때에 수강하는 것이 바람직합니다. 

보안을 잊지 마십시오.

Session, XSS웹 보안에 대해 익힙니다. PHP 는 타 언어에 비해 진입 장벽이 다소 낮기 때문에 오히려 보안과 같은 사항이 지켜지지 않는 경우가 많습니다. 이는 웹 어플리케이션 작성에 있어서 문제가 될 수 있으며 우리가 설령 보안 전문가는 아니라고 할 지라도 기본적인 보안 사항은 지켜줄 필요가 있습니다. 

결국, 게시판을 만들게 되어 있습니다.

레거시 프로젝트로 게시판을 만듭니다. 백지에서 index.php 를 작성하는 것을 시작으로 프로젝트가 진행됩니다. 이러한 게시판 프로젝트가 현재 프레임워크 위주로 개발되어 돌아가는 웹 어플리케이션 세계에 있어서 맞지 않을 수 있습니다. 하지만 PHP 의 프레임워크인 라라벨을 조금이라도 이해하기 위해서는 레거시로 프로젝트를 작성해볼 필요가 있으며, 놀랍게도 현장에는 레거시로 작성된 PHP 4, PHP 5 어플리케이션 또한 많습니다.

 

언제까지, 레거시입니까?

레거시로 작성한 게시판 프로젝트를 '어떤 아키텍쳐' 를 묘사하며 비슷하게 따라합니다. 객체지향으로 구현한 '진짜' 는 아니기에 언급하지 않습니다.  하지만 현재 존재하는 코드를 함수화 함으로써 코드가 극적으로 변화하는 모습을 볼 수 있습니다. 객체지향으로 구현해보는 것은 『PHP 7+ 프로그래밍: 객체지향』 에서 이야기 할 예정입니다.

강의를 듣기 전에 필요한 것들

개발 서버는 빌트인 내장 서버를 사용하지만, 필요에 따라 WAMP와 같은 도구를 사용하거나, PHP 매뉴얼을 참고해주세요.

  • PHP 7.4.21 TS(Thread Safe) (64bit)
  • XDebug 3.0.4 TS (64bit)
  • 코드 편집기는 VSCode(Visual Studio Code)를 사용합니다.

예제코드

이 강좌의 예제코드는 깃허브 레포지토리에서 찾을 수 있습니다. 프론트엔드에  CSS Framework 와 텍스트 에디터로 CKEditor 5 를 사용합니다.

Q&A

2023년 07월 24일부터 개인적인 사유로 강의에 대한 질문을 받지 않고 있습니다. 하지만 이미 수년간 작성된 질의응답은 살펴볼 수 있습니다. 커뮤니티에서 질문을 찾아보실 것을 권합니다.

공식문서 & 서적

Q. 이 강좌 이후에는 어떤 것을 공부하면 좋을까요?

A. 객체지향 파트를 반드시 공부해야 합니다. 자료는 PHP 문서를 보는 것이 그나마 낫습니다. 물론, PHP 는 함수형 프로그래밍을 할 수도 있으므로 그것을 알아보는 것도 좋습니다. 그 외에 PHP Coding Stadnard, PSR(PHP Standard Recommendation) 등을 알아봐야 합니다. 한 가지 확실한 것은 객체지향을 공부하기 이전에 라라벨 프레임워크로 넘어가는 것은 지양하는 것이 좋습니다.

이 강좌의 다음 강좌는  『PHP 7+ 프로그래밍: 객체지향』입니다. 이번 강좌에서 함수에 대한 이야기를 주로 했다면, 객체지향에서는 클래스와 객체에 대한 이야기를 주로하고, 그 뿐만 아니라 패키지매니저 등 조금 더 깊은 내용을 살펴봅니다.

2020년 06월 09일 『PHP 7+ 프로그래밍: 객체지향』 강의가 공개되었습니다.

 

이제는 객체지향으로 한 발짝 앞으로 나아가야 할 때
『PHP 7+ 프로그래밍: 객체지향』
PHP 7+ 프로그래밍: 객체지향

이런 분들께
추천드려요!

학습 대상은
누구일까요?

  • PHP 를 배워보고 싶으신 분

  • PHP 로 웹 서비스를 구축해보고 싶으신 분

  • PHP 를 확실하게 알아보고 싶으신 분

안녕하세요
정상우입니다.

1,706

수강생

68

수강평

187

답변

4.2

강의 평점

3

강의

https://github.com/pronist

커리큘럼

전체

71개 ∙ (15시간 33분)

강의 게시일: 
마지막 업데이트일: 

수강평

전체

29개

3.7

29개의 수강평

  • sinnara135792511님의 프로필 이미지
    sinnara135792511

    수강평 2

    평균 평점 4.0

    3

    56% 수강 후 작성

    The class content is good.. but I wonder if they prepare it.. When explaining functions or logic, why? and how to use it are things that beginners desperately want... Oh my.. I took off 1 point because I skipped over it too quickly. Also, when I skipped around, my pronunciation was slurred a lot, so it was hard to understand. The reason students pay to take the class is because they want to know why functions are used.. how the logic works, but there are almost no cases where they are taught.. Since there aren't many video lectures related to PHP controllers right now, if you have to watch this, I recommend this lecture. :) Please... If it's because of the pronunciation, please put subtitles on it.. Ah! It's good to leave comments.. Of course, it's the students' job to pick out and eat it nutritiously.. I said I'd answer.. I'm not saying that I'll just tell you what I want...ㅎ.ㅐ.

    • dirend79555님의 프로필 이미지
      dirend79555

      수강평 46

      평균 평점 5.0

      5

      100% 수강 후 작성

      Thank you for opening a good lecture. The students in this lecture understood the http protocol, and although it is a php lecture, it was a good lecture to give those who are just starting to create a web the overall direction and basics of the web. I personally recommend it to those who are worried about how to configure basic security when creating a web for the first time. The teacher kindly answered many questions, so I was able to complete the copy project safely. (I was honored that my question was listed as a reference question!!^^) While waiting for the next lecture, I hope you make the code font a little bigger.^^ Thank you!!

      • pronist
        지식공유자

        Oh, thank you for leaving a review. The object-oriented section has been made up to the grammar section, but I think the font size should be increased for the next section. (You are the first person to complete this course. Thank you!)

    • devedu1609님의 프로필 이미지
      devedu1609

      수강평 2

      평균 평점 4.5

      4

      100% 수강 후 작성

      path patch, rewind rewind this part is too... yes... well...

      • pronist
        지식공유자

        Oh, I pronounced it wrong lol I'll reflect on it. Are the other parts okay? If there are any other problems besides what you mentioned in other class reviews, please let me know :) I'll be able to improve it in future classes.

      • In Section 4, you created a legacy project example and talked about the problems, and you said you would fix these parts in Section 5. When you create a functions.php file in the lib folder, it feels like you just copy and paste this part when creating a bulletin board. Of course, you will understand it after you create it all. Do you actually create it like this when you implement it? Before starting Section 5, I think it would be good to explain how Laravel follows the structure, how I organized the folders, how this folder was organized, and why it was created this way. When I wrote the legacy code, it was like this, but I will change this part like this. If you tell me in advance and proceed with the lecture, I think it will be easier to understand.

      • pronist
        지식공유자

        I definitely can't seem to shake off the idea that functions.php is being created all at once. I also agree that there was a lack of additional explanation. Good. Thank you for your valuable opinion. :)

    • ghzm02641021님의 프로필 이미지
      ghzm02641021

      수강평 7

      평균 평점 4.1

      3

      37% 수강 후 작성

      I wish you could pronounce it correctly.. I'm a little disappointed that I can't hear what you're saying even though I'm concentrating on it. The lecture itself is easy..

      • pronist
        지식공유자

        Thank you for the review! I think my pronunciation was a bit awkward because it was my first lecture. xD + And then I realized.. I guess I'll have to re-encode it and make the sound louder.. ㅜㅜ

    • henu님의 프로필 이미지
      henu

      수강평 9

      평균 평점 5.0

      5

      100% 수강 후 작성

      The main language for development work is JAVA, but I am maintaining legacy projects created with PHP 5.* versions. In the case of PHP, I learned it by myself with a thin book and working on the job. When I was working on advanced tasks, I felt frustrated because I didn't have a deep knowledge of PHP. However, after taking this lecture, I had the opportunity to properly learn about PHP's basic grammar and development methods. Of course, I learned based on PHP 7, but there was no problem applying what I learned in this lecture to a PHP 5.* project. I think proper learning of version 7 would start with the OOP lecture. I will take a break here for a while and review my work and study the OOP lecture. I would like to thank the instructor who answered my questions with sincerity, and the instructor who gave me the opportunity to learn modern PHP.

      • pronist
        지식공유자

        Thank you for watching the lecture. Looking back, it was a lecture that had many shortcomings in explanation and various aspects, but I am glad that you understood it. Thank you for leaving a review. If you have any questions about the object-oriented lecture, please ask questions. ㅎㅎ

    비슷한 강의

    같은 분야의 다른 강의를 만나보세요!

    연관 로드맵

    강의가 포함된 로드맵으로 학습해 보세요!

    ₩55,000